www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminHTML\makehtm_inc\D_makehtml_class.asp
<% '************************************************************** ' 新动软网站管理系统 ' 官方网站: http://www.aspcpu.com ' 系统作者: 阮丁远(网名:天下程序) ' Copyright 新动软网站管理系统 版权所有 '************************************************************** %> <% Server.ScriptTimeout=999999 session.timeout=600 %> <!--#include file=../../../inc/config.asp--> <!--#include file=../../../inc/new_md5.asp--> <!--#include file=../../../inc/functionFiless.asp--> <!--#include file=clsCachea.asp--> <!--#include file=../../../inc/ND_moban_page_type.asp--> <% '设置同页面文件名时的生成htm时搜索链接的深度,如aaa.asp?page=1,aaa.asp?page=1中又有aaa.asp?page=2,aaa.asp?page=2中又有aaa.asp?page=3,这样的搜索的搜索时的深度,0则不下一层,-123则不限制深度 tong_pagename_shendu=99999 tong_pagename_shendu=-123 '设置不同页面文件名时的生成htm时搜索链接的深度,如aaa.asp,aaa.asp中又有bbb.asp,bbb.asp中又有ccc.asp,这样的搜索的搜索时的深度,0则不下一层,-123则不限制深度 butong_pagename_shendu=99999 butong_pagename_shendu=-123 '是否智能分析带http://的链接的域名是否指向本站,如bbs.aaa.com也是ww.aaa.com的,故为其生成htm页 nd_zhineng_fenxi_httplink=1 '是否智能分析a href字符是否包含在某个js 的script 里,如果这样则不为此a href链接生成htm页 nd_zhineng_fenxi_hreflink_if_in_script=1 '是否搜索非本站内部链接的其他站的链接并为其对应的页生成htm页(如果是其他站的htm页则拷此htm页到本地) nd_is_htmled_qita_zhan_x=0 '搜索非本站内部链接的其他站的链接并为其对应的页生成htm页时(如果是其他站的htm页则拷此htm页到本地),设置同页面文件名时的生成htm时搜索链接的深度,如aaa.asp?page=1,aaa.asp?page=1中又有aaa.asp?page=2,aaa.asp?page=2中又有aaa.asp?page=3,这样的搜索的搜索时的深度,0则不下一层,-123则不限制深度 nd_qitawww_tong_pagename_shendu=99999 nd_qitawww_tong_pagename_shendu=-123 '搜索非本站内部链接的其他站的链接并为其对应的页生成htm页时(如果是其他站的htm页则拷此htm页到本地),设置不同页面文件名时的生成htm时搜索链接的深度,如aaa.asp,aaa.asp中又有bbb.asp,bbb.asp中又有ccc.asp,这样的搜索的搜索时的深度,0则不下一层,-123则不限制深度 nd_qitawww_butong_pagename_shendu=99999 nd_qitawww_butong_pagename_shendu=-123 '如果为某个asp页类链接生成其对应的htm页时,读取此asp页出错,如404错误,500错误,是否不替换这个asp页类链接为 生成的htm页链接,并不生成其htm页,如可能是其他站的/x/xx.asp页,或其他站的xx/1.jpg,则无必要生成并且无必要替换链接 nd_noreplced_url_when_falied_xmlhttp=1 '是否拷贝非asp类文件到whtml生成目录 nd_is_kao_feiasp_x=1 '是否拷贝全部asp类文件的副本到whtml生成目录,以便供可能存在的nd_reg.asp,nd_chk_... .asp,save.asp之类的处理页 用 nd_is_kao_copedasp_x=1 'debug_on="off" debug_on="off" if session(nd_admin_cach_varb_name)="" then if request.cookies(nd_admin_cach_varb_name)="" then uuuaa="" else uuuaa=request.cookies(nd_admin_cach_varb_name) end if else uuuaa=session(nd_admin_cach_varb_name) end if if session(nd_admin_cach_varb_name&"_pwd")="" then if request.cookies(nd_admin_cach_varb_name&"_pwd")="" then uuuaapwd="" else uuuaapwd=request.cookies(nd_admin_cach_varb_name&"_pwd") end if else uuuaapwd=session(nd_admin_cach_varb_name&"_pwd") end if '防止生成htm的时间过久而登陆超时: '防止生成htm的时间过久而登陆超时: response.cookies(nd_admin_cach_varb_name)=uuuaa Response.Cookies(nd_admin_cach_varb_name).Expires=DateAdd("n",35,now()) response.cookies(nd_admin_cach_varb_name&"_pwd")=uuuaapwd Response.Cookies(nd_admin_cach_varb_name&"_pwd").Expires=DateAdd("n",35,now()) session(nd_admin_cach_varb_name)="" session(nd_admin_cach_varb_name)=uuuaa session(nd_admin_cach_varb_name&"_pwd")="" session(nd_admin_cach_varb_name&"_pwd")=uuuaapwd dim htm_ext_ming htm_ext_ming="" encodeingxxx="gb2312" encodeingxxxhh="gb2312" nd_http_200ed_ok=0 dim nddd_is_qiye encodeingxxx_in_http_header="gb2312" dim now_pos_in_asp now_pos_in_asp=1 dim loaded_file_types dim glbal_nd_x_pindao_id,glbal_nd_x_zhuanti_id,glbal_nd_x_class_id,glbal_nd_x_view_id dim ndx_cid_var_namex,ndx_pindao_id_var_namex,ndx_zid_var_namex,ndx_viewid_var_namex dim nd_pindao_idx,nd_zhuanti_idx,nd_cidx,nd_view_idx ndx_cid_var_namex="" ndx_pindao_id_var_namex="" ndx_zid_var_namex="" ndx_viewid_var_namex="" Function CheckTheChar(TheChar,TheString) 'TheChar="要检测的字符串" 'TheString="待检测的字符串" if inStr(TheString,TheChar) then for n =1 to Len(TheString) if Mid(TheString,n,Len(TheChar))=TheChar then CheckTheChar=CheckTheChar+1 End if Next CheckTheChar=CheckTheChar else CheckTheChar=0 end if End Function function load_htm_ext_ming(is_qiye) biao2="[ND_sys]" if is_qiye=1 then set rs22d=server.CreateObject("adodb.recordset") rs22d.open "select top 1 * from "&biao2&" where type='webname_settings_qiye'",conn,1,1 else set rs22d=server.CreateObject("adodb.recordset") rs22d.open "select top 1 * from "&biao2&" where type='webname_settings'",conn,1,1 end if ddd1d=rs22d("data") rs22d.close set rs22d=nothing dddd12d=split(ddd1d,"|") hhhta=cstr(dddd12d(4)) hhhtax=cstr(dddd12d(5)) htm_ext_ming=mid(hhhtax,2,len(hhhtax)) End Function Function set_id_var_names(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex) ndx_cid_var_namex="" ndx_pindao_id_var_namex="" ndx_zid_var_namex="" ndx_viewid_var_namex="" ndx_cid_var_namex=cid_var_namex if ndx_cid_var_namex="" then ndx_cid_var_namex="cid" ndx_pindao_id_var_namex=pindao_id_var_namex if ndx_pindao_id_var_namex="" then ndx_pindao_id_var_namex="id" ndx_zid_var_namex=zid_var_namex if ndx_zid_var_namex="" then ndx_zid_var_namex="zid" ndx_viewid_var_namex=viewid_var_namex if ndx_viewid_var_namex="" then ndx_viewid_var_namex="" 'arid ,cpid End Function Function guolv_files_like_goto_down_file(aspfilepath,is_qiye) guolv_files_like_goto_down_file=0 datss_3a=aspfilepath '----- datss_31=replace(datss_3a,"\","/") if instr(1,datss_31,"/",1)<>0 then datss_31=mid(datss_31,instrrev(datss_31,"/")+1,len(datss_31)-(instrrev(datss_31,"/")+1)+1) end if if instr(1,datss_31,"?",1)<>0 then sfilename=left(datss_31,instr(1,datss_31,"?",1)-1) else sfilename=datss_31 end if sfilename=replace(sfilename,"\","/") if instr(1,sfilename,"/",1)<>0 then sfilename=mid(sfilename,instrrev(sfilename,"/")+1,len(sfilename)-(instrrev(sfilename,"/")+1)+1) end if ftypppe1=get_file_type(sfilename) doit_mode1="no" doit_mode1=get_url_mode_to_make_html(ftypppe1) if must_no_htmled_it=1 then guolv_files_like_goto_down_file=1 end if '----- end function Function GetBodyx(weburl) GetBodyx=GetBodyb(weburl) End Function bianma_reg="\<meta.+\s{0,}charset\s{0,}=\s{0,}([^\""|\s|\>|\/]*)\s{0,}[\""']?\s{0,}.+\/{0,1}\>" title_reg="\<title\>(.*)\<\/title\>" Function GetCode(str,regstr) Dim Reg,serStr set Reg= new RegExp Reg.IgnoreCase = True Reg.MultiLine = True Reg.Pattern =regstr if Reg.test(str) then '若查询到匹配项 Set Cols = Reg.Execute(str) serStr=trim(Cols(0).SubMatches(0)) '使用匹配到的第一个匹配项 else '否则给个默认值gb2312,有点省懒法,如果页面没给出编码格式,想知道确实有点麻烦 serStr=encodeingxxx_in_http_header end if GetCode=serStr end function Function GetBodyb(weburl) GetBodyb="生成此页的html页时超时,无法获得内容" '创建对象 'Dim ObjXMLHTTP Set ObjXMLHTTP=Server.CreateObject("MSXML2.serverXMLHTTP") on error resume next ObjXMLHTTP.setTimeouts 50000, 50000, 80000, 80000 '请求文件,以异步形式 ObjXMLHTTP.Open "GET",weburl,False ObjXMLHTTP.send 'While ObjXMLHTTP.readyState <> 4 'ObjXMLHTTP.waitForResponse 20000 'Wend '得到结果 nd_http_200ed_ok=1 if err.number<>0 then err.clear GetBodyb="xmlhttp超时,无法获得内容" exit function end if if instr(1,lcase(ObjXMLHTTP.getResponseHeader("Content-Type")),"text/html",1)=0 then GetBodyb="非网页数据" exit function end if encodeingxxx_in_http_header="gb2312" if instr(1,lcase(ObjXMLHTTP.getResponseHeader("Content-Type")),"utf-8",1)<>0 then encodeingxxx_in_http_header="utf-8" else encodeingxxx_in_http_header="gb2312" end if if ObjXMLHTTP.status>300 then nd_http_200ed_ok=0 end if GetBodybx1=ObjXMLHTTP.responseBody GetBodyax2 =ObjXMLHTTP.responseText encodeingxxx=GetCode(GetBodyax2,bianma_reg) GetBodyb=BytesToBstrc(GetBodybx1,encodeingxxx) set re=nothing '释放对象 Set ObjXMLHTTP=Nothing End Function Function BytesToBstrc(body,Cset) 'dim objstream set objstream = Server.CreateObject("adodb.stream") objstream.Type = 1 objstream.Mode =3 objstream.Open objstream.Write body objstream.Position = 0 objstream.Type = 2 objstream.Charset = Cset BytesToBstrc = objstream.ReadText objstream.Close set objstream = nothing End Function Function jieuqx(wstr,starta,overa) Set xiaoqi = New Regexp'设置配置对象 xiaoqi.IgnoreCase = True'忽略大小写 xiaoqi.Global = True'设置为全文搜索 xiaoqi.Pattern = "”&starta&“.+?”&overa&“"'正则表达式 Set Matches =xiaoqi.Execute(wstr)'开始执行配置 jieuqx="" For Each Match in Matches jieuqx=jieuqx&Match.Value '循环匹配 Next set xiaoqi=nothing End Function '================================================== '函数名:ReplaceSaveRemoteFilex '作 用:替换、保存远程图片 '参 数:ConStr ------ 要替换的字符串 '参 数:SaveTf ------ 是否保存文件,False不保存,True保存 '参 数: TistUrl------ 当前网页地址 '================================================== Function ReplaceSaveRemoteFile(ConStr,strInstallDir,strChannelDir,SaveTf,TistUrl) If ConStr="$False$" or ConStr="" Then ReplaceSaveRemoteFile=ConStr Exit Function End If Dim TempStr,TempStr2,TempStr3,Re,Matches,Match,Tempi,TempArray,TempArray2 Set Re = New Regexp Re.IgnoreCase = True Re.Global = True Re.Pattern ="<img.+?[^\>]>" Set Matches =Re.Execute(ConStr) For Each Match in Matches If TempStr<>"" then TempStr=TempStr & "$Array$" & Match.Value Else TempStr=Match.Value End if Next If TempStr<>"" Then TempArray=Split(TempStr,"$Array$") TempStr="" For Tempi=0 To Ubound(TempArray) Re.Pattern ="src\s*=\s*.+?\.(gif|jpg|bmp|jpeg|psd|png|svg|dxf|wmf|tiff)" Set Matches =Re.Execute(TempArray(Tempi)) For Each Match in Matches If TempStr<>"" then TempStr=TempStr & "$Array$" & Match.Value Else TempStr=Match.Value End if Next Next End if If TempStr<>"" Then Re.Pattern ="src\s*=\s*" TempStr=Re.Replace(TempStr,"") End If Set Matches=nothing Set Re=nothing If TempStr="" or IsNull(TempStr)=True Then ReplaceSaveRemoteFile=ConStr Exit function End if TempStr=Replace(TempStr,"""","") TempStr=Replace(TempStr,"'","") TempStr=Replace(TempStr," ","") Dim RemoteFileurl,SavePath,PathTemp,DtNow,strFileName,strFileType,ArrSaveFileName,RanNum,Arr_Path DtNow=Now() If SaveTf=True then '*********************************** SavePath= "../../uploadfile/image" & "/" & year(DtNow) &"-"& right("0" & month(DtNow),2) & "-remotepic/" response.write "链接路径:" & savepath & "<br>" Arr_Path=Split(SavePath,"/") PathTemp="" set filea=new Cls_FSO set fileb=new DosAsp call createfile(SavePath&"1111.txt","1111",true) call deletefile(SavePath&"1111.txt") SaveTf2=SaveTf For Tempi=0 To Ubound(Arr_Path) If Tempi=0 Then PathTemp=Arr_Path(0) & "/" ElseIf Tempi=Ubound(Arr_Path) Then Exit For Else PathTemp=PathTemp & Arr_Path(Tempi) & "/" End If If CheckDir(PathTemp)=False and Arr_Path(Tempi)<>".." Then If MakeNewsDir(PathTemp)=False Then SaveTf=False Exit For End If End If Next End If SaveTf=SaveTf2 '去掉重复图片开始 TempArray=Split(TempStr,"$Array$") TempStr="" For Tempi=0 To Ubound(TempArray) If Instr(Lcase(TempStr),Lcase(TempArray(Tempi)))<1 Then TempStr=TempStr & "$Array$" & TempArray(Tempi) End If Next TempStr=Right(TempStr,Len(TempStr)-7) TempArray=Split(TempStr,"$Array$") '去掉重复图片结束 '转换相对图片地址开始 TempStr="" For Tempi=0 To Ubound(TempArray) TempStr=TempStr & "$Array$" & DefiniteUrl(TempArray(Tempi),TistUrl) Next TempStr=Right(TempStr,Len(TempStr)-7) TempStr=Replace(TempStr,Chr(0),"") TempArray2=Split(TempStr,"$Array$") TempStr="" '转换相对图片地址结束 '图片替换/保存 Set Re = New Regexp Re.IgnoreCase = True Re.Global = True For Tempi=0 To Ubound(TempArray2) RemoteFileUrl=TempArray2(Tempi) If RemoteFileUrl<>"$False$" And SaveTf=True Then'保存图片 ArrSaveFileName = Split(RemoteFileurl,".") strFileType=Lcase(ArrSaveFileName(Ubound(ArrSaveFileName)))'文件类型 If strFileType="asp" or strFileType="asa" or strFileType="aspx" or strFileType="cer" or strFileType="cdx" or strFileType="exe" or strFileType="rar" or strFileType="zip" then UploadFiles="" ReplaceSaveRemoteFile=ConStr Exit Function End If Randomize RanNum=Int(900*Rnd)+100 strFileName = year(DtNow) & right("0" & month(DtNow),2) & right("0" & day(DtNow),2) & right("0" & hour(DtNow),2) & right("0" & minute(DtNow),2) & right("0" & second(DtNow),2) & ranNum & "." & strFileType Re.Pattern =TempArray(Tempi) If SaveRemoteFile(SavePath & strFileName,RemoteFileUrl)=True Then '******************************** PathTemp=SavePath & strFileName PathTemp=RelativePath2RootPath(SavePath & strFileName) ConStr=Re.Replace(ConStr,PathTemp) Re.Pattern=strInstallDir & strChannelDir & "/" 'UploadFiles=UploadFiles & "|" & Re.Replace(SavePath &strFileName,"") UploadFiles=UploadFiles & "|" & RelativePath2RootPath(SavePath & strFileName) Else PathTemp=RemoteFileUrl ConStr=Re.Replace(ConStr,PathTemp) 'UploadFiles=UploadFiles & "|" & RemoteFileUrl End If ElseIf RemoteFileurl<>"$False$" and SaveTf=False Then'不保存图片 Re.Pattern =TempArray(Tempi) ConStr=Re.Replace(ConStr,RemoteFileUrl) 'zhushi by rdy 'UploadFiles=UploadFiles & "|" & RemoteFileUrl End If Next Set Re=nothing If UploadFiles<>"" Then UploadFiles=Right(UploadFiles,Len(UploadFiles)-1) End If ReplaceSaveRemoteFile=ConStr End function '((http|https|ftp):(\/\/|\\\\)((\w)+[.]){1,}(net|com|cn|org|cc|tv|[0-9]{1,3})(((\/[\~]*|\\[\~]*)(\w)+)|[.](\w)+)*(((([?](\w)+){1}[=]*))*((\w)+){1}([\&](\w)+[\=](\w)+)*)*) '我写的href_reg="<a[^>]+href=\s*[""|\']?\s*([^>""\']+((\.asp)|(\.asp\?(((\w*\=[^""\'\&]*\&)+(\w*\=[^""\'\&]*))|(\w*\=[^""\'\&]*)))))\s*[""|\']?\s*((\s+[^>]+>)|(>))([^(<\/a>)]+)<\/a>" dim href_url_index,href_url_len dim need_href_array need_href_array="" Function get_need_htmled_hrefArray_from_a_page_x_cid(Cont,cid_var_name,pindao_id_var_name,cid,aspfilenma,pindao_id,dothtm_or_html,is_qiye) href_reg="<a[^>]+href\s*=\s*[""|\']?\s*([^>""\']+)\s*[""|\']?\s*((\s+[^>]+>)|(>))" href_reg2="(<a[^>]+href\s*=\s*[""|\']?\s*)([^>""\']+)(\s*[""|\']?\s*((\s+[^>]+>)|(>)))" href_reg3="([^\.]*)(\.asp)(.*)" contbkkkk=Cont have_asp=1 now_pos_in_asp=1 need_href_array="" '----------------v2----------- glbal_diff_pos=0 '----------------v2----------- '----------------v2----------- 'do while (have_asp=1 or have_plusb=1) have_asp=0 have_plusb=0 '----------------v2----------- Set regEx = New RegExp '建立正则表达式。 regEx.Pattern = href_reg '设置模式。 regEx.IgnoreCase = True '设置是否区分字符大小写。 'regEx.Global = True '设置全局可用性。 regEx.Global = true '----------------v2----------- contbbofore="" contb=Cont 'lennnaa=len(Cont) 'if now_pos_in_asp>lennnaa then exit do 'contb=mid(Cont,now_pos_in_asp,lennnaa-now_pos_in_asp+1) 'contbbofore="" 'if now_pos_in_asp<>1 then 'contbbofore=mid(Cont,1,now_pos_in_asp-1) 'end if 'lencontb=len(contb) '----------------v2----------- Set Matches = regEx.Execute(contb) '执行搜索。 For Each Match in Matches '遍历匹配集合。 'Match.FirstIndex 'Match.Value 'Match.Length '=Match.SubMatches(0) '------------v1.2------------------ call nd_process_sleep(nd_sleep_x_times_htmd_gethref) '------------v1.2------------------ href_url=Match.Value 'href_url_index=Match.FirstIndex '----------------v2----------- href_url_index=Match.FirstIndex+glbal_diff_pos need_exeeet=0 have_asp=0 have_plusb=0 lencontb=len(cont) contb=Cont '----------------v2----------- href_url_len=Match.Length href_url_link=Match.SubMatches(0) 'response.write mid(Cont,href_url_index+1,href_url_len)&"<hr>" href_url_index=href_url_index+1 have_asp_other=0 href_url_linktb=href_url_link href_url_link=trim(replace(href_url_link,"\","/")) aspfnmaaa="" aspfnmaaa_quan="" if instr(1,href_url_link,"/",1)<>0 then if lcase(left(href_url_link,7))="http://" then href_url_link2=mid(href_url_link,8,len(href_url_link)-8+1) end if if inStrRev(href_url_link,"/")=len(href_url_link) then ccachea="" else ccachea=mid(href_url_link,inStrRev(href_url_link,"/")+1,len(href_url_link)-(inStrRev(href_url_link,"/")+1)+1) aspfnmaaa_quan=ccachea end if else ccachea=href_url_link aspfnmaaa_quan=ccachea end if ccachea=trim(ccachea) if instr(1,ccachea,"?",1)<>0 and left(ccachea,1)<>"?" then fnmaaa=left(ccachea,instr(1,ccachea,"?",1)-1) if lcase((right(fnmaaa,4)))=".asp" then have_asp_other=1 aspfnmaaa=fnmaaa end if end if if instr(1,ccachea,"?",1)=0 and lcase((right(ccachea,4)))=".asp" then have_asp_other=1 aspfnmaaa=ccachea end if '得到href链接最后的asp文件名 aspfnmaaa=lcase(trim(aspfnmaaa)) 'aspfilenma可以带目录前缀 aspfilenmazz=aspfilenma aspfilenmaww=aspfilenma aspfilenmaww=trim(replace(aspfilenmaww,"\","/")) if instr(1,aspfilenmaww,"/",1)<>0 then aspfilenmaww=mid(aspfilenmaww,instrrev(aspfilenmaww,"/")+1,len(aspfilenmaww)-(instrrev(aspfilenmaww,"/")+1)+1) end if aspfilenmaww=lcase(trim(aspfilenmaww)) if instr(1,aspfilenmaww,"?",1)<>0 then aspfilenmaww=left(aspfilenmaww,instr(1,aspfilenmaww,"?",1)-1) end if if aspfnmaaa=aspfilenmaww then have_asp=1 else have_asp=0 end if if is_qiye=1 then weburla="../../"&nd_web_output_folder_qiye&"/"&aspfilenmazz nd_weboutpppt=nd_web_output_folder_qiye else weburla="../../"&nd_web_output_folder&"/"&aspfilenmazz nd_weboutpppt=nd_web_output_folder end if aspfilenmazza=aspfilenmazz '提取asp文件名前的目录路径到sfilenameab变量 aspfilenmazza=replace(aspfilenmazza,"\","/") if instr(1,aspfilenmazza,"/",1)<>0 then aspfilenmazza=left(aspfilenmazza,instrrev(aspfilenmazza,"/")) else aspfilenmazza="" end if weburlqq=RelativePath2RootPathv(weburla) '如/xasp/1.asp '下面这行勿删,下面有用着 weburlaa=GetUrlpath()&RelativePath2RootPathv(weburla) '如http://127.0.0.1:81/xasp/1.asp weburlaas=weburlaa weburlqq=trim(lcase(left(weburlqq,instrrev(weburlqq,"/")))) aspalujin="" '-----1----- '如果是http://路径时,比较是否同一文件 if lcase(left(href_url_link,7))="http://" then fin_posaa=-123 for iiaappss=8 to len(href_url_link) if mid(href_url_link,iiaappss,1)="/" then fin_posaa=iiaappss exit for end if next if have_asp_other=1 and fin_posaa<>-123 then href_url_link22=mid(href_url_link,fin_posaa,len(href_url_link)-fin_posaa+1) aspalujin22=trim(lcase(left(href_url_link22,instrrev(href_url_link22,"/")))) if instr(1,aspalujin22,"/"&nd_weboutpppt&"/",1)=0 then have_asp_other=0 end if end if if have_asp_other=1 and fin_posaa=-123 then have_asp_other=0 end if if fin_posaa=-123 then have_asp=0 else if have_asp=1 then http_urla=lcase(mid(href_url_link,1,fin_posaa-1)) '以下替换勿改,下面有用着 '以下替换勿改,下面有用着 href_url_link=mid(href_url_link,fin_posaa,len(href_url_link)-fin_posaa+1) aspalujin=trim(lcase(left(href_url_link,instrrev(href_url_link,"/")))) if aspalujin=weburlqq then have_asp=1 else have_asp=0 end if 'http://路径前缀不相同的话则不为同一文件 '不在根目录下运行本系统时也要测试下本代码 if http_urla<>lcase(GetUrlpath()) then have_asp=0 have_asp_other=0 end if end if end if end if '-----2----- '如果是绝对路径时,比较是否同一文件 '注意:可能/1.asp与/11/1.asp '不在根目录下运行本系统时也要测试下本代码 if lcase(left(href_url_link,1))="/" then aspalujin=trim(lcase(left(href_url_link,instrrev(href_url_link,"/")))) if have_asp_other=1 then if instr(1,aspalujin,"/"&nd_weboutpppt&"/",1)=0 then have_asp_other=0 end if end if if have_asp=1 then if aspalujin=weburlqq then have_asp=1 else have_asp=0 end if end if end if '-----3----- '如果是相对路径时,肯定不是同一文件 '不在根目录下运行本系统时也要测试下本代码 if lcase(left(href_url_link,3))="../" then have_asp=0 end if '------4----- ' ../xasp/../xasp这样的呢?, /xasp/../xasp/../xasp这样的呢? ............... if aspalujin="" and instr(1,href_url_link,"/",1)<>0 then aspalujin=trim(lcase(left(href_url_link,instrrev(href_url_link,"/")))) end if if have_asp=1 then have_asp_other=0 end if have_plusb=0 href_url_linkt=lcase(trim(aspalujin&aspfnmaaa_quan)) '----------------v2----------- need_exeeet=0 '----------------v2----------- ' have_asp_other=1表示是/xasp/或/xcomasp目录下的asp文件,但是此asp文件和aspfilenma的文件名值不是同名的 if have_asp_other=1 and guolv_files_like_goto_down_file(aspfnmaaa,is_qiye)=0 then href_url_linkot=href_url_link ConsultUrlxa=weburlaas aaalinksss=lcase(trim(DefiniteUrlxxc(href_url_linkot,ConsultUrlxa))) if left(aaalinksss,7)="http://" then aaalinksss=mid(aaalinksss,8,len(aaalinksss)-8+1) end if aaalinksss=replace(aaalinksss,"\","/") fin_posaa=-123 for iiaappss2=1 to len(aaalinksss) if mid(aaalinksss,iiaappss2,1)="/" then fin_posaa=iiaappss2 exit for end if next if fin_posaa<>-123 then aaalinksss=mid(aaalinksss,fin_posaa,len(aaalinksss)-fin_posaa+1) end if nodoiiiiit=0 lenouttppt=len(nd_weboutpppt)+1 sstestt=trim(lcase("/"&nd_weboutpppt)) if instr(1,aaalinksss,"/"&nd_weboutpppt&"/",1)=0 then nodoiiiiit=1 end if 'call 频道内部链接文件轮询来强制加了可能的cid或pindao_id等的url参数 () aaalinksss=get_qiangzhi_url_cang_main(aaalinksss,ndx_cid_var_namex,ndx_pindao_id_var_namex,ndx_zid_var_namex,ndx_viewid_var_namex,contbkkkk) if nodoiiiiit=0 then href_url_linksss=aaalinksss href_url_linktaaa=aaalinksss href_url_linksss=get_md5_htm_filename_by_aspfilename(href_url_linksss,contbkkkk,dothtm_or_html,1,aspfilenmazza) if lcase(trim(aspfnmaaa))="index.asp" or lcase(trim(aspfnmaaa))="default.asp" then href_url_linksss="index."&dothtm_or_html end if href_url_linksssaa=href_url_linksss '含前缀目录的话在文件名前加上此前缀目录 if instr(1,href_url_link,"/",1)<>0 then href_url_linksss=aspalujin&href_url_linksss end if before_urla="" if href_url_index-1<>0 then before_urla=mid(contb,1,href_url_index-1) end if after_urla="" if href_url_index+href_url_len<=lencontb then after_urla=mid(contb,href_url_index+href_url_len,lencontb-(href_url_index+href_url_len)+1) end if '去掉$1,$3的干扰 href_url_linksss=replace(href_url_linksss,"$1","#121#1#21#aspcpu") href_url_linksss=replace(href_url_linksss,"$3","#121#3#21#aspcpu") Set regEx2 = New RegExp '建立正则表达式。 regEx2.Pattern = href_reg2 '设置模式。 regEx2.IgnoreCase = True '设置是否区分字符大小写。 regEx2.Global = true href_url_linkssszz=regEx2.Replace(href_url,"$1"&href_url_linksss&"$3") '执行 set regEx2=nothing href_url_linkssszz=replace(href_url_linkssszz,"#121#1#21#aspcpu","$1") href_url_linkssszz=replace(href_url_linkssszz,"#121#3#21#aspcpu","$3") Cont=contbbofore&before_urla&href_url_linkssszz&after_urla now_pos_in_asp=href_url_index+len(href_url_linkssszz)+len(contbbofore) '----------------v2----------- glbal_diff_pos=glbal_diff_pos+(len(href_url_linkssszz)-len(href_url)) '----------------v2----------- need_href_array=need_href_array&"other_asp"&"$x$1$,$1$x$"&aspfilenma&"$x$1$,$1$x$"&href_url_linktaaa&"$x$1$,$1$x$"&href_url_linksssaa&"$$need_htmed_aspcpu121$$" have_plusb=1 '----------------v2----------- need_exeeet=1 'exit for '----------------v2----------- else if guolv_files_like_goto_down_file(aspfnmaaa,is_qiye)=0 then now_pos_in_asp=href_url_index+href_url_len+len(contbbofore) end if end if end if '----------------v2----------- if need_exeeet=0 then '----------------v2----------- if have_asp=1 and guolv_files_like_goto_down_file(aspfnmaaa,is_qiye)=0 then href_url_linkot=href_url_link ConsultUrlxa=weburlaas aaalinksss=lcase(trim(DefiniteUrlxxc(href_url_linkot,ConsultUrlxa))) if left(aaalinksss,7)="http://" then aaalinksss=mid(aaalinksss,8,len(aaalinksss)-8+1) end if aaalinksss=replace(aaalinksss,"\","/") fin_posaa=-123 for iiaappss22=1 to len(aaalinksss) if mid(aaalinksss,iiaappss22,1)="/" then fin_posaa=iiaappss22 exit for end if next if fin_posaa<>-123 then aaalinksss=mid(aaalinksss,fin_posaa,len(aaalinksss)-fin_posaa+1) end if nodoiiiiit=0 lenouttppt=len(nd_weboutpppt)+1 sstestt=trim(lcase("/"&nd_weboutpppt)) if instr(1,aaalinksss,"/"&nd_weboutpppt&"/",1)=0 then nodoiiiiit=1 end if href_url_linksss=aaalinksss '------- q-- if nodoiiiiit=0 then href_url_linksss=get_qiangzhi_url_cang_main(href_url_linksss,ndx_cid_var_namex,ndx_pindao_id_var_namex,ndx_zid_var_namex,ndx_viewid_var_namex,contbkkkk) href_url_linksssff=href_url_linksss href_url_linksss=get_md5_htm_filename_by_aspfilename(href_url_linksss,contbkkkk,dothtm_or_html,1,aspfilenmazza) if lcase(trim(aspfnmaaa))="index.asp" or lcase(trim(aspfnmaaa))="default.asp" then href_url_linksss="index."&dothtm_or_html end if href_url_linksssaa=href_url_linksss '含前缀目录的话在文件名前加上此前缀目录 if instr(1,href_url_link,"/",1)<>0 then href_url_linksss=aspalujin&href_url_linksss end if before_urla="" if href_url_index-1<>0 then before_urla=mid(contb,1,href_url_index-1) end if after_urla="" if href_url_index+href_url_len<=lencontb then after_urla=mid(contb,href_url_index+href_url_len,lencontb-(href_url_index+href_url_len)+1) end if '去掉$1,$3的干扰 href_url_linksss=replace(href_url_linksss,"$1","#121#1#21#aspcpu") href_url_linksss=replace(href_url_linksss,"$3","#121#3#21#aspcpu") Set regEx2 = New RegExp '建立正则表达式。 regEx2.Pattern = href_reg2 '设置模式。 regEx2.IgnoreCase = True '设置是否区分字符大小写。 regEx2.Global = true href_url_linkssszz=regEx2.Replace(href_url,"$1"&href_url_linksss&"$3") '执行 set regEx2=nothing href_url_linkssszz=replace(href_url_linkssszz,"#121#1#21#aspcpu","$1") href_url_linkssszz=replace(href_url_linkssszz,"#121#3#21#aspcpu","$3") Cont=contbbofore&before_urla&href_url_linkssszz&after_urla now_pos_in_asp=href_url_index+len(href_url_linkssszz)+len(contbbofore) '----------------v2----------- glbal_diff_pos=glbal_diff_pos+(len(href_url_linkssszz)-len(href_url)) '----------------v2----------- need_href_array=need_href_array&"self_asp"&"$x$1$,$1$x$"&aspfilenma&"$x$1$,$1$x$"&href_url_linksssff&"$x$1$,$1$x$"&href_url_linksssaa&"$$need_htmed_aspcpu121$$" '----------------v2----------- need_exeeet=1 'exit for '----------------v2----------- else if guolv_files_like_goto_down_file(aspfnmaaa,is_qiye)=0 then now_pos_in_asp=href_url_index+href_url_len+len(contbbofore) end if end if '-------end q-- else if have_asp_other=0 and guolv_files_like_goto_down_file(aspfnmaaa,is_qiye)=0 then '找到href链接,但是href里的链接同名同路径的.asp文件且不是同路径前缀的非同名.asp文件 ,或不是.asp文件,跳过 now_pos_in_asp=href_url_index+href_url_len+len(contbbofore) end if end if '----------------v2----------- if need_exeeet=0 then '----------------v2----------- if guolv_files_like_goto_down_file(aspfnmaaa,is_qiye)=1 then now_pos_in_asp=href_url_index+href_url_len+len(contbbofore) end if '----------------v2----------- end if '----------------v2----------- '----------------v2----------- end if '----------------v2----------- Next set regEx=nothing '----------------v2----------- 'loop '----------------v2----------- if need_href_array<>"" and len(need_href_array)>22 then need_href_array=left(need_href_array,len(need_href_array)-len("$$need_htmed_aspcpu121$$")) end if get_need_htmled_hrefArray_from_a_page_x_cid=Cont End Function Function get_all_samename_asp_url(Cont,cid_var_name,pindao_id_var_name,cid,aspfilenma,pindao_id,is_qiye) href_reg="<a[^>]+href\s*=\s*[""|\']?\s*([^>""\']+)\s*[""|\']?\s*((\s+[^>]+>)|(>))" href_reg2="(<a[^>]+href\s*=\s*[""|\']?\s*)([^>""\']+)(\s*[""|\']?\s*((\s+[^>]+>)|(>)))" href_reg3="([^\.]*)(\.asp)(.*)" contbkkkk=Cont need_href_array="" '.................. End Function Function GetLocationURL() Dim Url Dim ServerPort,ServerName,ScriptName,QueryString ServerName = Request.ServerVariables("SERVER_NAME") ServerPort = Request.ServerVariables("SERVER_PORT") ScriptName = Request.ServerVariables("SCRIPT_NAME") QueryString = Request.ServerVariables("QUERY_STRING") Url="http://"&ServerName If ServerPort <> "80" Then Url = Url & ":" & ServerPort 'Url=Url&ScriptName 'If QueryString <>"" Then Url=Url&"?"& QueryString GetLocationURL=Url End Function Function GetUrlpath() ScriptAddress = CStr(GetLocationURL()) '取得当前地址 GetUrlpath = ScriptAddress End Function Function RelativePath2RootPathv(url) 'Dim sTempUrl sTempUrl = url If Left(sTempUrl, 1) = "/" Then RelativePath2RootPathv = sTempUrl Exit Function End If 'Dim m_strPath m_strPath = Request.ServerVariables("SCRIPT_NAME") m_strPath = Left(m_strPath, InStrRev(m_strPath, "/") - 1) Do While Left(sTempUrl, 3) = "../" sTempUrl = Mid(sTempUrl, 4) m_strPath = Left(m_strPath, InStrRev(m_strPath, "/") - 1) Loop RelativePath2RootPathv = m_strPath & "/" & sTempUrl End Function '================================================== '函数名:DefiniteUrlxxc '作 用:将相对地址转换为绝对地址 '参 数:PrimitiveUrlStrx ------要转换的相对地址 '参 数:ConsultUrlStrx ------当前网页地址 '================================================== 'Function DefiniteUrlxxc(ByVal PrimitiveUrlStrx, ByVal ConsultUrlStrx) '勿删 Function DefiniteUrlxxc(PrimitiveUrlx, ConsultUrlx) DefiniteUrlxxc=DefiniteUrl(PrimitiveUrlx, ConsultUrlx) End Function Function CheckUrl(strUrl) Dim Re Set Re=new RegExp Re.IgnoreCase =true Re.Global=True Re.Pattern="http://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?" If Re.test(strUrl)=True Then CheckUrl=strUrl Else CheckUrl="$False$" End If Set Rs=Nothing End Function Function ishaveobjc(ByVal strClassString) 'Dim xTestObj,ClsString On Error Resume Next ishaveobjc = False ClsString = strClassString Err = 0 Set xTestObj = Server.CreateObject(ClsString) If Err = 0 Then ishaveobjc = True If Err = -2147352567 Then ishaveobjc = True Set xTestObj = Nothing Err = 0 Exit Function End Function Function CheckhtmDir(byval FolderPath) 'dim fso Set fso = Server.CreateObject(fssoo_nd_var_str_x_customx) If fso.FolderExists(Server.MapPath(folderpath)) then '存在 CheckhtmDir = True Else '不存在 CheckhtmDir = False End if Set fso = nothing End Function Function MakehtmDir(byval foldername) 'dim fso Set fso = Server.CreateObject(fssoo_nd_var_str_x_customx) fso.CreateFolder(Server.MapPath(foldername)) If fso.FolderExists(Server.MapPath(foldername)) Then MakehtmDir = True Else MakehtmDir = False End If Set fso = nothing End Function Function CreatePathhh(fromPath) 'Dim objFSO, uploadpath uploadpath = Year(Now) & "-" & Month(Now) '以年月创建上传文件夹,格式:2007-8 uploadpath = Replace(uploadpath, ".", "_") On Error Resume Next Set objFSO =Server.CreateObject(fssoo_nd_var_str_x_customx) If objFSO.FolderExists(Server.MapPath(fromPath & uploadpath)) = False Then objFSO.CreateFolder Server.MapPath(fromPath & uploadpath) End If If Err.Number = 0 Then CreatePathhh = uploadpath & "/" Else CreatePathhh = "" End If Set objFSO = Nothing End Function '*********************************************** '函数名:JoinChara '作 用:向地址中加入 ? 或 & '参 数:strUrl ----网址 '返回值:加了 ? 或 & 的网址 '*********************************************** function JoinChara(strUrl) if strUrl="" then JoinChara="" exit function end if if InStr(strUrl,"?")<len(strUrl) then if InStr(strUrl,"?")>1 then if InStr(strUrl,"&")<len(strUrl) then JoinChara=strUrl & "&" else JoinChara=strUrl end if else JoinChara=strUrl & "?" end if else JoinChara=strUrl end if end function set filea=new Cls_FSO set fileb=new DosAsp dim haved,num_folders,flst(),ppath,sssd dim CacheTemp function copy_all_asp_and_img_files(is_qiye) is_qiye=clng(is_qiye) '重要: nddd_is_qiye=is_qiye '缓存路径 CacheTemp=Lcase(trim(request.ServerVariables("SCRIPT_NAME"))) CacheTemp=left(CacheTemp,instrrev(CacheTemp,"/")) CacheTemp=replace(CacheTemp,"\","_") CacheTemp=replace(CacheTemp,"/","_") CacheTemp=nd_admin_cach_varb_name&"cacheclse"& CacheTemp 'ppath=request("ppath") if is_qiye=1 then ppath=nd_web_output_folder_qiye else ppath=nd_web_output_folder end if if ppath="" then sssd="" else sssd="/" end if if request("dfirst")="1" then haved=0 call list_folder_s_files("root") call zhangkai_all_folder() Set myCache=new clsCache_b myCache.name=CacheTemp & "cop_arr" Call myCache.clean() myCache.add flst,Dateadd("h",999,now) myCache.name=CacheTemp & "cop_now_pos_a" Call myCache.clean() myCache.add 0,Dateadd("h",999,now) myCache.name=CacheTemp & "cop_havd" Call myCache.clean() myCache.add haved,Dateadd("h",999,now) set myCache=nothing call do_copy_all_asp_and_img(is_qiye) else call do_copy_all_asp_and_img(is_qiye) end if end function function list_folder_s_files(iq) if iq="root" then npath="" else npath=flst(iq,0) end if ss3=filea.ShowFolderList(server.mappath("../../"&ppath&sssd&npath)) ss4=filea.ShowFileList(server.mappath("../../"&ppath&sssd&npath)) if ss3=-1 or ss3="" then nofolder=1 numf1=0 else ss3=left(ss3,len(ss3)-1)'去掉最后一个|号 '处理文件夹 fl1=split(ss3,"|") numf1=ubound(fl1)+1 end if if ss4=-1 or ss4="" then nofiles=1 numf2=0 else ss4=left(ss4,len(ss4)-1) '去掉最后一个|号 '处理文件 fl2=split(ss4,"|") numf2=ubound(fl2)+1 end if 'response.write numf1+numf2 if haved=0 then old_len=0 else old_len=ubound(flst)+1 end if if old_len+(numf1+numf2)>=1 then haved=1 redim cache_list(old_len,3) for k=0 to old_len-1 cache_list(k,0)=flst(k,0) cache_list(k,1)=flst(k,1) cache_list(k,2)=flst(k,2) next redim flst(old_len+(numf1+numf2)-1,3) for k=0 to old_len-1 flst(k,0)=cache_list(k,0) flst(k,1)=cache_list(k,1) flst(k,2)=cache_list(k,2) next for iw=old_len to (old_len+numf1-1) ii=iw-old_len sssf="/" if npath="" then sssf="" flst(iw,0)=npath&sssf&fl1(ii) flst(iw,1)=0 '=0表示文件夹 flst(iw,2)=0 '=0表示文件夹未展开为文件,=1表示文件夹已展开为文件 next for i=old_len+numf1 to old_len+numf1+numf2-1 ii=i-(old_len+numf1) sssf="/" if npath="" then sssf="" flst(i,0)=npath&sssf&fl2(ii) flst(i,1)=1 '=1表示文件 flst(i,2)=1 next 'test---------------------------------- 'response.write "<br>called end " 'for iii=0 to ubound(flst) 'response.write "<br> <font color=#00ffff>iii="&iii&":"&flst(iii,0)&" is_opend:"&flst(iii,2)&"</font><br>" 'next 'end test----------------------------- end function function zhangkai_all_folder() num_folders=0 if haved=0 then a_len=-1 else a_len=ubound(flst) end if for iq=0 to a_len 'response.write a_len if flst(iq,1)=0 and flst(iq,2)=0 then flst(iq,2)=1 call list_folder_s_files(iq) num_folders=num_folders+1 '递归遍历 call zhangkai_all_folder() if haved=0 then a_len=-1 else a_len=ubound(flst) end if end if next end function function list_all_files() if haved=0 then a_len=-1 else a_len=ubound(flst) end if for ipp=0 to a_len if flst(ipp,1)=1 then response.write flst(ipp,0)&"<br>" end if next end function function do_copy_all_asp_and_img(is_qiyea) per_numxa=2 Set myCache1=new clsCache_b myCache1.name=CacheTemp & "cop_now_pos_a" If myCache1.valid then now_a_pos=myCache1.value Else now_a_pos=0 End If myCache1.name=CacheTemp & "cop_arr" If myCache1.valid then cop_arra=myCache1.value Else cop_arra=empty End If myCache1.name=CacheTemp & "cop_havd" If myCache1.valid then haved=myCache1.value Else haved=0 End If Set myCache1=nothing 'response.write ubound(cop_arra) 'response.end sssdxx=sssd ppathxx=ppath if haved=0 then a_len=-1 else a_len=ubound(cop_arra) end if ii_p_num=0 for ipp=now_a_pos to a_len ii_p_num=ii_p_num+1 if cop_arra(ipp,1)=1 then '文件名路径 eee1=cop_arra(ipp,0) if instr(1,eee1,"{",1)=0 and instr(1,eee1,"}",1)=0 then sss111=filea.ShowFileAccessInfo(server.mappath("../../"&ppathxx&sssdxx&eee1),7) else sss111=0 end if if is_qiyea=1 then ppathtt=nd_webhtml_output_folder_qiye else ppathtt=nd_webhtml_output_folder end if need_copy=0 if filea.ReportFileStatus(server.mappath("../../"&ppathtt&"/"&eee1))=1 then sss111bb=filea.ShowFileAccessInfo(server.mappath("../../"&ppathtt&"/"&eee1),7) '小于13000字节可能导致文件修改后文件大小没变,故加了 or sss111<13000 if sss111<>sss111bb or sss111<13000 then need_copy=1 end if else need_copy=1 end if extnm=lcase(mid(eee1,inStrRev(eee1,".")+1,len(eee1)-inStrRev(eee1,"."))) is_aspf=0 if extnm="asp" then need_copy=1 is_aspf=1 end if '拷首页,但由根目录下的index.asp来转向到/whtml/index.htm 'if lcase(eee1)="index.asp" or lcase(eee1)="default.asp" then 'need_copy=0 'end if forweixx=request("forwei") 'forweixx=1则只生成未处理的 'forweixx=1则只生成未处理的 if cstr(forweixx)="1" and filea.ReportFileStatus(server.mappath("../../"&ppathtt&"/"&eee1))=1 then need_copy=0 ii_p_num=ii_p_num-1 end if if need_copy=1 then '如不存在目标目录则先创建目录 call createfile("../../"&ppathtt&"/"&eee1,"1111",true) call deletefile("../../"&ppathtt&"/"&eee1) if is_aspf=1 then coantt=loadfile("../../"&ppathxx&sssdxx&eee1) coantt=get_all_aspfile_s_ajax(coantt,channel_typea,ppathxx&sssdxx&eee1) call createfile("../../"&ppathtt&"/"&eee1,coantt,true) else call filea.CopyAFile(server.mappath("../../"&ppathxx&sssdxx&eee1), server.mappath("../../"&ppathtt&"/"&eee1)) end if end if end if had_ended=0 if ipp>=a_len then had_ended=1 exit for end if if ii_p_num>=per_numxa then ippaaab=ipp+1 exit for end if next Set myCache2=new clsCache_b myCache2.name=CacheTemp & "cop_now_pos_a" Call myCache2.clean() myCache2.add ippaaab,Dateadd("h",999,now) now_asp_ppppta=ppathxx&sssdxx&eee1 Set myCache2=nothing response.ContentType="text/xml" response.write "<?xml version=""1.0"" encoding=""gb2312""?>" response.write "<aaaa>" response.write "<affff><![CDATA["&cstr(had_ended) response.write "]]></affff><affff2><![CDATA["&now_asp_ppppta&"]]></affff2><affff3><![CDATA["&"ok"&"]]></affff3></aaaa>" end function '************************************************************************************************* 'Function get_md5_htm_filename_by_aspfile(aspfilename,........) '自动排序asp文件后的url参数名并生成其md5后的htm文件名, '对于多个page565656528之类的url参数名,按page565656528之类在asp网页里出现的次序来排序, '并且page565656528之类的url参数名 排在 url参数名集合最后几位 'page565656528=3记为pagerndaspcpuvar0=3,来放进url参数名集合里来生成其md5后的htm文件名, 'page565656528不用放进,因为它的565656528是随机的 '注意aaaa/wwss.asp?cid=22&id=1这样的含目录的asp文件名的处理,目录名也要包含进去来算md5后的htm文件名 '所有asp文件名都lcase和trim处理后再算md5后的htm文件名 ',另外,由于用扫描cid方式扫描分类页时加了 频道id参数:id,故无论真实的链到分类页的链接里有无加 频道id参数:id, '都强制加 频道id参数:id 到 真实的链到分类页的链接里,以使按url参数名生成其md5后的htm文件名 能统一起来 '************************************************************************************************* Function get_md5_htm_filename_by_aspfilename(aspfilename,aspfile_output_htmlcontent,dothtm_or_html,is_md5ed,qianzhui_lujin) redim canming(999) redim canvalue(999) redim minvalue_index(999) redim canming_temp(999) redim canvalue_temp(999) aspfilename=trim(lcase(aspfilename)) if instr(1,aspfilename,"?",1)<>0 and len(aspfilename)>=instr(1,aspfilename,"?",1)+1 then urlcan=mid(aspfilename,instr(1,aspfilename,"?",1)+1,len(aspfilename)-instr(1,aspfilename,"?",1)) else urlcan="" end if if instr(1,aspfilename,"?",1)<>0 then sfilename=left(aspfilename,instr(1,aspfilename,"?",1)-1) else sfilename=aspfilename end if strUrl=lcase(JoinChara(sfilename)) Fy_Url1=urlcan Fy_a1=split(Fy_Url1,"&") redim canming(ubound(Fy_a1)+1) redim canvalue(ubound(Fy_a1)+1) lenttt=ubound(Fy_a1) for Fy_x1=0 to ubound(Fy_a1) if instr(1,Fy_a1(Fy_x1),"=",1)=0 then if is_md5ed=1 then get_md5_htm_filename_by_aspfilename=md5(lcase(aspfilename)&nd_fang_caiji_rand_str_x)&"."&dothtm_or_html else get_md5_htm_filename_by_aspfilename=lcase(aspfilename) end if exit function else if instr(Fy_a1(Fy_x1),"=")=len(Fy_a1(Fy_x1)) then Fy_v ="" else Fy_v = mid(Fy_a1(Fy_x1),instr(Fy_a1(Fy_x1),"=")+1,len(Fy_a1(Fy_x1))) end if Fy_Cs_name= left(Fy_a1(Fy_x1),instr(Fy_a1(Fy_x1),"=")-1) canming(Fy_x1)=Fy_Cs_name canvalue(Fy_x1)=Fy_v end if Next '排序算法: redim minvalue_index(ubound(Fy_a1)+1) for isssaa=0 to lenttt minvalue_index(isssaa)=-123 next redim pagevvvar(ubound(Fy_a1)+1) redim pagevvvar_v(ubound(Fy_a1)+1) pvar_pos=0 redim pagevvvar_minindex(ubound(Fy_a1)+1) for isssaa2=0 to lenttt pagevvvar_minindex(isssaa2)=-123 next '----------paixu code--------------- for nowmin=0 to lenttt firstrun=1 for mppp=0 to lenttt '----------排除排过了的元素 need_break=0 for nowmintest=0 to nowmin if minvalue_index(nowmintest)=mppp then need_break=1 exit for end if next '--------end 排除排过了的元素 if need_break=0 then if firstrun=1 then firstrun=0 minvalue_index(nowmin)=mppp end if end if '----------排除page9256572330之类 if need_break=0 then if len(canming(minvalue_index(nowmin)))=14 and lcase(left(canming(minvalue_index(nowmin)),4))="page" then tstdd=mid(canming(minvalue_index(nowmin)),5,10) href_reg22="[0-9]{10}" Set regEx22 = New RegExp '建立正则表达式。 regEx22.Pattern = href_reg22 '设置模式。 regEx22.IgnoreCase = True '设置是否区分字符大小写。 regEx22.Global = true if regEx22.test(tstdd)=true then need_break=1 need_jilup=1 for piiis=0 to pvar_pos-1 if lcase(pagevvvar(piiis))=lcase(canming(minvalue_index(nowmin))) then need_jilup=0 exit for end if next if need_jilup=1 then pagevvvar(pvar_pos)=canming(minvalue_index(nowmin)) pagevvvar_v(pvar_pos)=canvalue(minvalue_index(nowmin)) pvar_pos=pvar_pos+1 end if end if set regEx22=nothing end if if len(canming(mppp))=14 and lcase(left(canming(mppp),4))="page" then tstdd=mid(canming(mppp),5,10) href_reg22="[0-9]{10}" Set regEx22 = New RegExp '建立正则表达式。 regEx22.Pattern = href_reg22 '设置模式。 regEx22.IgnoreCase = True '设置是否区分字符大小写。 regEx22.Global = true if regEx22.test(tstdd)=true then need_break=1 need_jilup=1 for piiis=0 to pvar_pos-1 if lcase(pagevvvar(piiis))=lcase(canming(mppp)) then need_jilup=0 exit for end if next if need_jilup=1 then pagevvvar(pvar_pos)=canming(mppp) pagevvvar_v(pvar_pos)=canvalue(mppp) pvar_pos=pvar_pos+1 end if end if set regEx22=nothing end if end if '--------end 排除page9256572330之类 if need_break=0 then '-------对于含多个字符的字符串的 字符串排序 先后的比较,从低位字符比较起,直到最高位字符 for char_wei=1 to 999 if len(canming(minvalue_index(nowmin)))>=char_wei and len(canming(mppp))<char_wei then minvalue_index(nowmin)=mppp exit for end if if len(canming(minvalue_index(nowmin)))<char_wei and len(canming(mppp))>=char_wei then exit for end if if len(canming(minvalue_index(nowmin)))<char_wei and len(canming(mppp))<char_wei and len(canming(minvalue_index(nowmin)))<len(canming(mppp)) then exit for end if if len(canming(minvalue_index(nowmin)))<char_wei and len(canming(mppp))<char_wei and len(canming(minvalue_index(nowmin)))>len(canming(mppp)) then minvalue_index(nowmin)=mppp exit for end if if len(canming(minvalue_index(nowmin)))<char_wei and len(canming(mppp))<char_wei and len(canming(minvalue_index(nowmin)))=len(canming(mppp)) then exit for end if if len(canming(minvalue_index(nowmin)))>=char_wei and len(canming(mppp))>=char_wei then '不能判断,执行下面的代码继续进一步判断 end if if asc(lcase(mid(canming(mppp),char_wei,1)))<asc(lcase(mid(canming(minvalue_index(nowmin)),char_wei,1))) then minvalue_index(nowmin)=mppp exit for end if if asc(lcase(mid(canming(mppp),char_wei,1)))>asc(lcase(mid(canming(minvalue_index(nowmin)),char_wei,1))) then exit for end if if asc(lcase(mid(canming(mppp),char_wei,1)))=asc(lcase(mid(canming(minvalue_index(nowmin)),char_wei,1))) then end if next '----end---对于含多个字符的字符串的 字符串排序 先后的比较,从低位字符比较起,直到最高位字符 end if next next '----------end paixu code------- for ippsxxa=0 to pvar_pos-1 next if pvar_pos-1>=0 then 'page123123123,page5634534534之类的排序code: 'page123123123,page5634534534之类的排序code: '----------paixu code2--------------- for nowmin2=0 to pvar_pos-1 firstrun=1 for mppp2=0 to pvar_pos-1 '----------排除排过了的元素 2 need_break=0 for nowmintest2=0 to nowmin2 if pagevvvar_minindex(nowmintest2)=mppp2 then need_break=1 exit for end if next '--------end 排除排过了的元素 2 if need_break=0 then if firstrun=1 then firstrun=0 pagevvvar_minindex(nowmin2)=mppp2 end if end if if need_break=0 then poshtmla=instr(1,aspfile_output_htmlcontent,pagevvvar(mppp2),1) poshtmlb=instr(1,aspfile_output_htmlcontent,pagevvvar(pagevvvar_minindex(nowmin2)),1) if poshtmla<poshtmlb then pagevvvar_minindex(nowmin2)=mppp2 end if end if next next '----------end paixu code2--------------- redim pagevvvar_temp(pvar_pos) redim pagevvvar_v_temp(pvar_pos) for azasxx=0 to pvar_pos-1 pagevvvar_temp(azasxx)=pagevvvar(azasxx) pagevvvar_v_temp(azasxx)=pagevvvar_v(azasxx) Next for azasxxb=0 to pvar_pos-1 pagevvvar(azasxxb)=pagevvvar_temp(pagevvvar_minindex(azasxxb)) pagevvvar_v(azasxxb)=pagevvvar_v_temp(pagevvvar_minindex(azasxxb)) Next end if for Fy_x1a=0 to lenttt canming_temp(Fy_x1a)=canming(Fy_x1a) canvalue_temp(Fy_x1a)=canvalue(Fy_x1a) Next for Fy_x1aa=0 to lenttt canming(Fy_x1aa)=canming_temp(minvalue_index(Fy_x1aa)) canvalue(Fy_x1aa)=canvalue_temp(minvalue_index(Fy_x1aa)) Next if pvar_pos-1>=0 then for Fy_x1aass=(lenttt-pvar_pos+1) to lenttt if is_md5ed=1 then canming(Fy_x1aass)="pagerndaspcpuvar"&cstr(Fy_x1aass-(lenttt-pvar_pos+1)) else canming(Fy_x1aass)=pagevvvar(Fy_x1aass-(lenttt-pvar_pos+1)) end if canvalue(Fy_x1aass)=pagevvvar_v(Fy_x1aass-(lenttt-pvar_pos+1)) Next end if for Fy_x1aaa=0 to lenttt Fy_Cs_name=trim(lcase(canming(Fy_x1aaa))) Fy_v=trim(lcase(canvalue(Fy_x1aaa))) if trim(Fy_Cs_name)<>"" then strUrl=JoinChara(strUrl) strUrl=strUrl&Fy_Cs_name&"="&Fy_v end if next 'qianzhui_lujin=lcase(trim(qianzhui_lujin)) qianzhui_lujin="" if is_md5ed=1 then get_md5_htm_filename_by_aspfilename=md5(qianzhui_lujin&strUrl&nd_fang_caiji_rand_str_x)&"."&dothtm_or_html else get_md5_htm_filename_by_aspfilename=qianzhui_lujin&strUrl end if End Function dim connhtm function openconnhtm() ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(dir_set&nd_ttxa_mdb) Set connhtm = Server.CreateObject("ADODB.Connection") connhtm.open ConnStr If Err Then Err.Clear Set connhtm = Nothing Response.Write "数据库连接出错,请检查Config.asp文件中的数据库参数设置。" Response.End End If end function function closeconnhtm() on error resume next connhtm.close set connhtm=nothing end function Const JET_3X = 4 '类似baidu的蜘蛛爬虫算法 ------柏拉图的程序 著: '类似baidu的蜘蛛爬虫算法 ------柏拉图的程序 著: 'per_run_htmed_num:设置每次ajax调用本asp时生成几页htm页后结束 'function make_sort_htm_by_cid(cid_var_name,pindao_id_var_name,cid,pindao_id,class_page_url,is_make_zi_sort_htm,is_qiye,per_run_htmed_num) function make_all_htm(is_qiye,per_run_htmed_num) is_cmsa=1 if cstr(is_qiye)="1" then is_cmsa=0 end if pageaa11="$page$main_index_page$" pageaa11=replace_webfiles_names(pageaa11,is_cmsa) class_page_url=pageaa11 call load_files_all_type(is_qiye) per_run_htmed_num=clng(per_run_htmed_num) '缓存路径 CacheTemp=Lcase(trim(request.ServerVariables("SCRIPT_NAME"))) CacheTemp=left(CacheTemp,instrrev(CacheTemp,"/")) CacheTemp=replace(CacheTemp,"\","_") CacheTemp=replace(CacheTemp,"/","_") CacheTemp=nd_admin_cach_varb_name&"cachecls"& CacheTemp Set myCache=new clsCache_b if request("pos")="0" then '============1 'myCache.name=CacheTemp & "arr" 'Call myCache.clean() call openconnhtm() connhtm.execute("update ND_stutas set a_nofirstrun_a='0'") connhtm.execute("update ND_stutas set a_firstrunb_a='1'") connhtm.execute("delete from ND_htm_hrefs_cache") call closeconnhtm() call CompactDB(Server.MapPath(dir_set&nd_ttxa_mdb), "-1") '============1 myCache.name=CacheTemp & "nofirstrun_a" Call myCache.clean() myCache.name=CacheTemp & "firstrunb_a" Call myCache.clean() end if '===================a8 call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_stutas",connhtm,1,1 nofirstruna=clng(rshtm("a_nofirstrun_a")) rshtm.close set rshtm=nothing call closeconnhtm() '==================a8 if nofirstruna=1 then '===================a7 call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_stutas",connhtm,1,1 firstrunb=clng(rshtm("a_firstrunb_a")) rshtm.close set rshtm=nothing call closeconnhtm() '==================a7 end if 'class_page_url可以是1.asp或aa/1/1.asp带子目录形式的 'class_page_url可以是1.asp或aa/1/1.asp带子目录形式的 filenamea=get_qiangzhi_url_cang_main(class_page_url,ndx_cid_var_namex,ndx_pindao_id_var_namex,ndx_zid_var_namex,ndx_viewid_var_namex,"") if is_qiye=1 then weburla="../../"&nd_web_output_folder_qiye&"/"&filenamea htmlfld=nd_webhtml_output_folder_qiye else weburla="../../"&nd_web_output_folder&"/"&filenamea htmlfld=nd_webhtml_output_folder end if weburla2=weburla weburla=GetUrlpath()&RelativePath2RootPathv(weburla) weburlauu=trim(lcase(RelativePath2RootPathv(weburla2))) if nofirstruna=0 then dataax=GetBodyx(weburla) end if 'response.write dataax 'class_page_url只会是aaa/1.asp ,dd/2.asp之类,不会是/aaa/1.asp之类 '提取asp文件名前的目录路径到sfilenameab变量 sfilenamea=replace(class_page_url,"\","/") if instr(1,sfilenamea,"/",1)<>0 then sfilenameab=left(sfilenamea,instrrev(sfilenamea,"/")) else sfilenameab="" end if if nofirstruna=0 then '如不存在html目录则创建html目录 call createfile("../../"&htmlfld&"/testt.txt","1111",true) call deletefile("../../"&htmlfld&"/testt.txt") if class_page_url="index.asp" or class_page_url="default.asp" then filenamea_htm="index."&htm_ext_ming else filenamea_htm=get_md5_htm_filename_by_aspfilename(weburlauu,dataax,htm_ext_ming,1,sfilenameab) end if now_htma_pos=0 '===================2 call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_htm_hrefs_cache",connhtm,1,3 rshtm.addnew rshtm("other_or_self")="self_asp" rshtm("jichu_dizhi")=class_page_url rshtm("asp_path")=weburlauu rshtm("htm_path")=filenamea_htm rshtm("is_htmed")="1" rshtm.update rshtm.close set rshtm=nothing call closeconnhtm() '===================2 now_asp_ppppt=filenamea have_htmedok_num=0 firstrunb=1 end if have_need_htmed=1 run_htmed_count=0 had_ended=0 do while have_need_htmed=1 have_need_htmed=0 run_htmed_count=run_htmed_count+1 fnd_htm_fl_posa=-123 if firstrunb=1 then firstrunb=0 else '===================3 call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_htm_hrefs_cache where other_or_self='self_asp' and htm_path<>'' and is_htmed='0'",connhtm,1,1 hhhvd_sx=0 if not rshtm.eof then datss_1=rshtm("other_or_self") datss_2=rshtm("jichu_dizhi") datss_3=trim(rshtm("asp_path")) datss_4=rshtm("htm_path") datss_5=rshtm("is_htmed") hhhvd_sx=1 nnnnow_rs_iid=rshtm("id") end if rshtm.close set rshtm=nothing call closeconnhtm() if hhhvd_sx=1 then '===================3 have_need_htmed=1 now_asp_ppppt=sfilenameab&datss_3 'if is_qiye=1 then 'weburlaa="../../"&nd_web_output_folder_qiye&"/"&sfilenameab&datss_3 'else 'weburlaa="../../"&nd_web_output_folder&"/"&sfilenameab&datss_3 'end if weburlaa=GetUrlpath()&datss_3 my_cang_p=datss_3 '----- datss_31=replace(datss_3,"\","/") if instr(1,datss_31,"/",1)<>0 then datss_31=mid(datss_31,instrrev(datss_31,"/")+1,len(datss_31)-(instrrev(datss_31,"/")+1)+1) end if if instr(1,datss_31,"?",1)<>0 then sfilename=left(datss_31,instr(1,datss_31,"?",1)-1) else sfilename=datss_31 end if sfilename=replace(sfilename,"\","/") if instr(1,sfilename,"/",1)<>0 then sfilename=mid(sfilename,instrrev(sfilename,"/")+1,len(sfilename)-(instrrev(sfilename,"/")+1)+1) end if ftypppe1=get_file_type(sfilename) doit_mode="no" doit_mode=get_url_mode_to_make_html(ftypppe1) '----- '提取当前asp文件名前的目录路径到sfilenameab变量,目录路径已去掉xndasp/或xcomasp/之类的前缀: '提取当前asp文件名前的目录路径到sfilenameab变量,目录路径已去掉xndasp/或xcomasp/之类的前缀: '==1== class_page_url=mid(datss_3,2,len(datss_3)) if instr(1,class_page_url,"?",1)<>0 then if instr(1,class_page_url,"?",1)=1 then class_page_url="" else class_page_url=mid(class_page_url,1,instr(1,class_page_url,"?",1)-1) end if end if class_page_urlcc=replace(class_page_url,"\","/") if instr(1,class_page_urlcc,"/",1)<>0 then if instrrev(class_page_urlcc,"/")+1<=len(class_page_urlcc) then class_page_urlbvv=mid(class_page_urlcc,instrrev(class_page_urlcc,"/")+1,len(class_page_urlcc)-(instrrev(class_page_urlcc,"/")+1)+1) else class_page_urlbvv="" end if else class_page_urlbvv=class_page_urlcc end if if is_qiye=1 then weburla22=nd_web_output_folder_qiye&"/" else weburla22=nd_web_output_folder&"/" end if 'class_page_url只会是aaa/1.asp ,dd/2.asp之类,不会是/aaa/1.asp之类 '提取asp文件名前的目录路径到sfilenameab变量 sfilenamea=replace(class_page_url,"\","/") sfilenameab="" if instr(1,sfilenamea,"/",1)<>0 then sfilenameab=left(sfilenamea,instrrev(sfilenamea,"/")) else sfilenameab="" end if if lcase(left(sfilenameab,len(weburla22)))=lcase(weburla22) then if len(weburla22)+1>len(sfilenameab) then sfilenameab="" else sfilenameab=mid(sfilenameab,len(weburla22)+1,len(sfilenameab)-(len(weburla22)+1)+1) end if end if class_page_url=sfilenameab&class_page_urlbvv '==1== dataax=GetBodyx(weburlaa) encodeingxxxhh=encodeingxxx filenamea_htm=datss_4 '================a1 fnd_htm_fl_posa=1 '================a1 'exit for end if 'next '生成/xasp/内的与自己非同名的其他asp页的htm,注意只搜索/xasp/内的asp页 if have_need_htmed=0 then 'for lstvvvva=0 to ubound(need_htmled_hrefArraya) 'datss_1=need_htmled_hrefArraya(lstvvvva,0)'是/xasp/里与自己同名的要生成htm的asp文件,还是其他/xasp/里的asp文件 的标记位 'datss_2=need_htmled_hrefArraya(lstvvvva,1) '基路径是相对于哪个asp文件 'datss_3=trim(need_htmled_hrefArraya(lstvvvva,2)) 'asp文件全路径文件名 'datss_4=need_htmled_hrefArraya(lstvvvva,3) 'htm文件名 'datss_5=need_htmled_hrefArraya(lstvvvva,4) '是否已生成htm的标记位 '===================3 call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_htm_hrefs_cache where other_or_self='other_asp' and htm_path<>'' and is_htmed='0'",connhtm,1,1 hhhvd_sx=0 if not rshtm.eof then datss_1=rshtm("other_or_self") datss_2=rshtm("jichu_dizhi") datss_3=trim(rshtm("asp_path")) datss_4=rshtm("htm_path") datss_5=rshtm("is_htmed") hhhvd_sx=1 nnnnow_rs_iid=rshtm("id") end if rshtm.close set rshtm=nothing call closeconnhtm() '===================3 if hhhvd_sx=1 then have_need_htmed=1 now_asp_ppppt=datss_3 weburlaa=GetUrlpath()&datss_3 my_cang_p=datss_3 '----- datss_31=replace(datss_3,"\","/") if instr(1,datss_31,"/",1)<>0 then datss_31=mid(datss_31,instrrev(datss_31,"/")+1,len(datss_31)-(instrrev(datss_31,"/")+1)+1) end if if instr(1,datss_31,"?",1)<>0 then sfilename=left(datss_31,instr(1,datss_31,"?",1)-1) else sfilename=datss_31 end if sfilename=replace(sfilename,"\","/") if instr(1,sfilename,"/",1)<>0 then sfilename=mid(sfilename,instrrev(sfilename,"/")+1,len(sfilename)-(instrrev(sfilename,"/")+1)+1) end if ftypppe1=get_file_type(sfilename) doit_mode="no" doit_mode=get_url_mode_to_make_html(ftypppe1) '----- '提取当前asp文件名前的目录路径到sfilenameab变量,目录路径已去掉xndasp/或xcomasp/之类的前缀: '提取当前asp文件名前的目录路径到sfilenameab变量,目录路径已去掉xndasp/或xcomasp/之类的前缀: '==1== class_page_url=mid(datss_3,2,len(datss_3)) if instr(1,class_page_url,"?",1)<>0 then if instr(1,class_page_url,"?",1)=1 then class_page_url="" else class_page_url=mid(class_page_url,1,instr(1,class_page_url,"?",1)-1) end if end if class_page_urlcc=replace(class_page_url,"\","/") if instr(1,class_page_urlcc,"/",1)<>0 then if instrrev(class_page_urlcc,"/")+1<=len(class_page_urlcc) then class_page_urlbvv=mid(class_page_urlcc,instrrev(class_page_urlcc,"/")+1,len(class_page_urlcc)-(instrrev(class_page_urlcc,"/")+1)+1) else class_page_urlbvv="" end if else class_page_urlbvv=class_page_urlcc end if if is_qiye=1 then weburla22=nd_web_output_folder_qiye&"/" else weburla22=nd_web_output_folder&"/" end if 'class_page_url只会是aaa/1.asp ,dd/2.asp之类,不会是/aaa/1.asp之类 '提取asp文件名前的目录路径到sfilenameab变量 sfilenamea=replace(class_page_url,"\","/") sfilenameab="" if instr(1,sfilenamea,"/",1)<>0 then sfilenameab=left(sfilenamea,instrrev(sfilenamea,"/")) else sfilenameab="" end if if lcase(left(sfilenameab,len(weburla22)))=lcase(weburla22) then if len(weburla22)+1>len(sfilenameab) then sfilenameab="" else sfilenameab=mid(sfilenameab,len(weburla22)+1,len(sfilenameab)-(len(weburla22)+1)+1) end if end if class_page_url=sfilenameab&class_page_urlbvv '==1== dataax=GetBodyx(weburlaa) encodeingxxxhh=encodeingxxx filenamea_htm=datss_4 '================a1 fnd_htm_fl_posa=1 '================a1 'exit for end if 'next end if if have_need_htmed=0 then had_ended=1 exit do end if end if connntxx=get_need_htmled_hrefArray_from_a_page_x_cid(dataax,cid_var_name,pindao_id_var_name,cid,class_page_url,pindao_id,htm_ext_ming,is_qiye) need_htmled_hrefArraya_1=split(need_href_array,"$$need_htmed_aspcpu121$$") lennehtm=ubound(need_htmled_hrefArraya_1) is_redirect_page=0 '==================panduan is_redirect_page============= if lennehtm>=2 then '是否此链接进入后会response.redirect到另一页 Randomize '初始化随机数生成器。 iposhtss=rnd(255)*lennehtm need_htmled_1=split(need_htmled_hrefArraya_1(iposhtss),"$x$1$,$1$x$") need_htmled_1_1=need_htmled_1(0) need_htmled_1_2=need_htmled_1(1) need_htmled_1_3=need_htmled_1(2) need_htmled_1_4=need_htmled_1(3) weburlaa=GetUrlpath()&need_htmled_1_3 dataaxx1=GetBodyx(weburlaa) if nd_http_200ed_ok=0 then Randomize '初始化随机数生成器。 iposhtss=rnd(255)*lennehtm need_htmled_1=split(need_htmled_hrefArraya_1(iposhtss),"$x$1$,$1$x$") need_htmled_1_1=need_htmled_1(0) need_htmled_1_2=need_htmled_1(1) need_htmled_1_3=need_htmled_1(2) need_htmled_1_4=need_htmled_1(3) weburlaa=GetUrlpath()&need_htmled_1_3 dataaxx1=GetBodyx(weburlaa) if nd_http_200ed_ok=0 then is_redirect_page=1 connntxx="此页是response.redirect而重定向来的页面,所有相对链接的基地址已重定向,无法判断,舍去" encodeingxxx="gb2312" end if end if end if if is_redirect_page=0 then '==================end is_redirect_page============= '===================4 call openconnhtm() for iposht=0 to lennehtm need_htmled_1=split(need_htmled_hrefArraya_1(iposht),"$x$1$,$1$x$") need_htmled_1_1=need_htmled_1(0) need_htmled_1_2=need_htmled_1(1) need_htmled_1_3=need_htmled_1(2) need_htmled_1_4=need_htmled_1(3) is_haved_filea=0 '排除重复的文件 set rshtm2=server.CreateObject("adodb.recordset") rshtm2.open "select * from ND_htm_hrefs_cache where htm_path='"&cstr(need_htmled_1_4)&"' and htm_path<>''",connhtm,1,1 if not rshtm2.eof then is_haved_filea=1 end if rshtm2.close set rshtm2=nothing 'end 排除重复的文件 if is_haved_filea=0 then set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_htm_hrefs_cache",connhtm,1,3 rshtm.addnew rshtm("other_or_self")=need_htmled_1_1 rshtm("jichu_dizhi")=need_htmled_1_2 rshtm("asp_path")=need_htmled_1_3 rshtm("htm_path")=need_htmled_1_4 rshtm("is_htmed")="0" rshtm.update rshtm.close set rshtm=nothing end if next call closeconnhtm() end if cur_bianma=encodeingxxxhh connntxx=get_all_html_s_ajax(connntxx,channel_typea,my_cang_p) '写入htm文件 connntxx="<!--last publish time:"&cstr(now())&",publish by newdsoft cms system-->"&connntxx call createfile("../../"&htmlfld&"/"&sfilenameab&filenamea_htm,connntxx,true) have_htmedok_num=have_htmedok_num+1 '=============a2 if firstrunb=0 and fnd_htm_fl_posa<>-123 then call openconnhtm() connhtm.execute("update ND_htm_hrefs_cache set is_htmed='1' where id="&nnnnow_rs_iid) call closeconnhtm() end if '=============a2 if run_htmed_count>per_run_htmed_num then exit do loop '=============a3 call openconnhtm() set rshtm2=server.CreateObject("adodb.recordset") rshtm2.open "select count(*) from ND_htm_hrefs_cache where is_htmed='1'",connhtm,1,1 if not rshtm2.eof then have_htmedok_num=rshtm2(0) end if rshtm2.close set rshtm2=nothing set rshtm2=server.CreateObject("adodb.recordset") rshtm2.open "select count(*) from ND_htm_hrefs_cache",connhtm,1,1 if not rshtm2.eof then now_htma_pos=rshtm2(0) end if rshtm2.close set rshtm2=nothing call closeconnhtm() '=============a3 '=============a5 call openconnhtm() connhtm.execute("update ND_stutas set a_nofirstrun_a='1'") connhtm.execute("update ND_stutas set a_firstrunb_a='"&cstr(firstrunb)&"'") call closeconnhtm() '=============a5 set myCache=nothing if debug_on="off" then response.ContentType="text/xml" response.write "<?xml version=""1.0"" encoding=""gb2312""?>" response.write "<aaaa>" response.write "<affff><![CDATA["&cstr(had_ended) response.write "]]></affff><affff2><![CDATA["&now_asp_ppppt&"]]></affff2><affff3><![CDATA["&"ok"&"]]></affff3><affff4><![CDATA["&cstr(now_htma_pos)&"]]></affff4><affff5><![CDATA["&cstr(have_htmedok_num)&"]]></affff5></aaaa>" end if end Function Function CompactDB(dbPath, boolIs97) '-------------------new code1-------------------- '重要 on error resume next '-------------------new code1-------------------- Dim fso, Engine, strDBPath strDBPath = left(dbPath,instrrev(DBPath,"")) Set fso = CreateObject(fssoo_nd_var_str_x_customx) '-------------------new code2-------------------- if fso.FileExists(strDBPath & "temp.mdb") then fso.DeleteFile(strDBPath & "temp.mdb") end if '-------------------new code2-------------------- If fso.FileExists(dbPath) Then Set Engine = CreateObject("JRO.JetEngine") If boolIs97 = "True" Then Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbpath, _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "temp.mdb;" _ & "Jet OLEDB:Engine Type=" & JET_3X Else Engine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & dbpath, _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & "temp.mdb" End If fso.CopyFile strDBPath & "temp.mdb",dbpath fso.DeleteFile(strDBPath & "temp.mdb") Set fso = nothing Set Engine = nothing CompactDB = "你的数据库 " & dbpath & " 已经压缩完毕" & vbCrLf Else CompactDB = "The database name or path has not been found. Try Again" & vbCrLf End If End Function function make_a_aspfile_s_htm_by_cid(ccccid,class_page_url,is_qiye,per_run_htmed_num,is_htmed_other_aspfile,makehtm_type) call load_files_all_type(is_qiye) if makehtm_type="job" or makehtm_type="guestbook" or makehtm_type="cpask" or makehtm_type="danartc" or makehtm_type="wdanartc" or makehtm_type="infoback" or makehtm_type="cpbuy" or makehtm_type="pindao_index" or makehtm_type="pindao_newlist" or makehtm_type="pindao_tjlist" or makehtm_type="pindao_hotlist" or makehtm_type="indexpage" then urmingar=ndx_pindao_id_var_namex urvaaluee=ccccid end if if makehtm_type="class" then urmingar=ndx_cid_var_namex urvaaluee=ccccid end if if makehtm_type="zhuanti" then urmingar=ndx_zid_var_namex urvaaluee=ccccid end if '================ if makehtm_type="zhuanti_new" then urmingar=ndx_zid_var_namex urvaaluee=ccccid fpgatype=get_file_type(class_page_url) if fpgatype="zt_art_view_page" then nd_view_biao_n_x1="[ND_Article]" nd_c_biao_n_x1="[ND_Article_Special]" end if if fpgatype="zt_down_view_page" then nd_view_biao_n_x1="[ND_down]" nd_c_biao_n_x1="[ND_down_Special]" end if if fpgatype="zt_picsp_view_page" then nd_view_biao_n_x1="[ND_pic_or_sp]" nd_c_biao_n_x1="[ND_pic_or_sp_Special]" end if if fpgatype="zt_prod_view_page" then nd_view_biao_n_x1="[ND_prod]" nd_c_biao_n_x1="[ND_prod_Special]" end if sql="select top 1 * from "&nd_view_biao_n_x1&" where SpecialID='"&ccccid&"' and is_shenhe='1' order by update_time_for_make_html desc" set Rs33a=server.CreateObject("adodb.recordset") Rs33a.open sql,conn,1,1 if not Rs33a.eof then shjiupdatm=Rs33a("update_time_for_make_html") else '可能是删文章 ,导致为空,所以也要刷新分类页 shjiupdatm="" end if class_page_urltte=class_page_url&"?"&urmingar&"="&urvaaluee '--------------tty filenameak=get_qiangzhi_url_cang_main(class_page_urltte,ndx_cid_var_namex,ndx_pindao_id_var_namex,ndx_zid_var_namex,ndx_viewid_var_namex,"") if is_qiye=1 then htmlfld=nd_webhtml_output_folder_qiye else htmlfld=nd_webhtml_output_folder end if if is_qiye=1 then weburlak="../../"&nd_web_output_folder_qiye&"/"&filenameak else weburlak="../../"&nd_web_output_folder&"/"&filenameak end if weburla2k=weburlak weburlak=GetUrlpath()&RelativePath2RootPathv(weburlak) weburlauuk=trim(lcase(RelativePath2RootPathv(weburla2k))) filenamea_htmk=get_md5_htm_filename_by_aspfilename(weburlauuk," ",htm_ext_ming,1,sfilenameab) sfilenamea=replace(class_page_url,"\","/") if instr(1,sfilenamea,"/",1)<>0 then sfilenameab=left(sfilenamea,instrrev(sfilenamea,"/")) else sfilenameab="" end if cishtmedda="0" stotyryy="../../"&htmlfld&"/"&sfilenameab&filenamea_htmk if filea.ReportFileStatus(server.mappath(stotyryy))=1 then tsssthtmmt=loadfile(stotyryy) pos_cnt_1a=instr(1,tsssthtmmt,"<!--last publish time:",1) pos_cnt_1a_1=pos_cnt_1a+len("<!--last publish time:") pos_cnt_2a=instr(1,tsssthtmmt,",publish by newdsoft",1) if pos_cnt_1a<>0 and pos_cnt_2a<>0 then timehtmaa=mid(tsssthtmmt,pos_cnt_1a_1,pos_cnt_2a-pos_cnt_1a_1) if timehtmaa<>"" and isdate(timehtmaa)=true then if cstr(shjiupdatm&"")<>"" then if datediff("n",shjiupdatm,cdate(timehtmaa))<0 or (datediff("n",shjiupdatm,cdate(timehtmaa))=0 and second(shjiupdatm)>=second(cdate(timehtmaa))) then cishtmedda="0" else cishtmedda="1" end if else '可能是删文章 ,导致为空,所以也要刷新分类页 cishtmedda="0" end if else cishtmedda="0" end if else cishtmedda="0" end if else cishtmedda="0" end if '--------------tty if cishtmedda="1" then if debug_on="off" then response.ContentType="text/xml" response.write "<?xml version=""1.0"" encoding=""gb2312""?>" response.write "<aaaa>" response.write "<affff><![CDATA["&"1" response.write "]]></affff><affff2><![CDATA["&"next...."&"]]></affff2><affff3><![CDATA["&"ok"&"]]></affff3><affff4><![CDATA["&"1"&"]]></affff4><affff5><![CDATA["&"1"&"]]></affff5></aaaa>" end if exit function end if end if '================ if makehtm_type="class_new" then urmingar=ndx_cid_var_namex urvaaluee=ccccid fpgatype=get_file_type(class_page_url) if fpgatype="article_class_page" then nd_view_biao_n_x1="[ND_Article]" nd_c_biao_n_x1="[ND_Article_class]" end if if fpgatype="down_class_page" then nd_view_biao_n_x1="[ND_down]" nd_c_biao_n_x1="[ND_down_class]" end if if fpgatype="picsp_class_page" then nd_view_biao_n_x1="[ND_pic_or_sp]" nd_c_biao_n_x1="[ND_pic_or_sp_class]" end if if fpgatype="cp_list_page" then nd_view_biao_n_x1="[ND_prod]" nd_c_biao_n_x1="[ND_prod_class]" end if set Rs33=server.CreateObject("adodb.recordset") sql="select cstr(parent_id_list) from "&nd_c_biao_n_x1&" where id="&ccccid Rs33.open sql,conn,1,1 sspa=rs33(0)&","&ccccid&"," sql="select top 1 * from "&nd_view_biao_n_x1&" where (classid='"&ccccid&"' or classid in (select cstr(id) from "&nd_c_biao_n_x1&" where parent_id_list like '%"&sspa&"%' ) or classid in (select cstr(id) from "&nd_c_biao_n_x1&" where parent_id='"&ccccid&"') ) and is_shenhe='1' order by update_time_for_make_html desc" set Rs33a=server.CreateObject("adodb.recordset") Rs33a.open sql,conn,1,1 if not Rs33a.eof then shjiupdatm=Rs33a("update_time_for_make_html") else '可能是删文章 ,导致为空,所以也要刷新分类页 shjiupdatm="" end if class_page_urltte=class_page_url&"?"&urmingar&"="&urvaaluee '--------------tty filenameak=get_qiangzhi_url_cang_main(class_page_urltte,ndx_cid_var_namex,ndx_pindao_id_var_namex,ndx_zid_var_namex,ndx_viewid_var_namex,"") if is_qiye=1 then htmlfld=nd_webhtml_output_folder_qiye else htmlfld=nd_webhtml_output_folder end if if is_qiye=1 then weburlak="../../"&nd_web_output_folder_qiye&"/"&filenameak else weburlak="../../"&nd_web_output_folder&"/"&filenameak end if weburla2k=weburlak weburlak=GetUrlpath()&RelativePath2RootPathv(weburlak) weburlauuk=trim(lcase(RelativePath2RootPathv(weburla2k))) filenamea_htmk=get_md5_htm_filename_by_aspfilename(weburlauuk," ",htm_ext_ming,1,sfilenameab) sfilenamea=replace(class_page_url,"\","/") if instr(1,sfilenamea,"/",1)<>0 then sfilenameab=left(sfilenamea,instrrev(sfilenamea,"/")) else sfilenameab="" end if cishtmedda="0" stotyryy="../../"&htmlfld&"/"&sfilenameab&filenamea_htmk if filea.ReportFileStatus(server.mappath(stotyryy))=1 then tsssthtmmt=loadfile(stotyryy) pos_cnt_1a=instr(1,tsssthtmmt,"<!--last publish time:",1) pos_cnt_1a_1=pos_cnt_1a+len("<!--last publish time:") pos_cnt_2a=instr(1,tsssthtmmt,",publish by newdsoft",1) if pos_cnt_1a<>0 and pos_cnt_2a<>0 then timehtmaa=mid(tsssthtmmt,pos_cnt_1a_1,pos_cnt_2a-pos_cnt_1a_1) if timehtmaa<>"" and isdate(timehtmaa)=true then if cstr(shjiupdatm&"")<>"" then if datediff("n",shjiupdatm,cdate(timehtmaa))<0 or (datediff("n",shjiupdatm,cdate(timehtmaa))=0 and second(shjiupdatm)>=second(cdate(timehtmaa))) then cishtmedda="0" else cishtmedda="1" end if else '可能是删文章 ,导致为空,所以也要刷新分类页 cishtmedda="0" end if else cishtmedda="0" end if else cishtmedda="0" end if else cishtmedda="0" end if '--------------tty if cishtmedda="1" then if debug_on="off" then response.ContentType="text/xml" response.write "<?xml version=""1.0"" encoding=""gb2312""?>" response.write "<aaaa>" response.write "<affff><![CDATA["&"1" response.write "]]></affff><affff2><![CDATA["&"next...."&"]]></affff2><affff3><![CDATA["&"ok"&"]]></affff3><affff4><![CDATA["&"1"&"]]></affff4><affff5><![CDATA["&"1"&"]]></affff5></aaaa>" end if exit function end if end if if makehtm_type="view" or makehtm_type="view_new" then fpgatype=get_file_type(class_page_url) if fpgatype="article_view_page" then nd_view_biao_n_x="[ND_Article]" end if if fpgatype="down_view_page" then nd_view_biao_n_x="[ND_down]" end if if fpgatype="picsp_view_page" then nd_view_biao_n_x="[ND_pic_or_sp]" end if if fpgatype="cp_view_page" then nd_view_biao_n_x="[ND_prod]" end if urmingar=ndx_viewid_var_namex set rshtm112=server.CreateObject("adodb.recordset") rshtm112.open "select * from "&nd_view_biao_n_x&" where classid='"&ccccid&"'",conn,1,1 if not rshtm112.eof then urvaaluee=rshtm112("id") else if debug_on="off" then response.ContentType="text/xml" response.write "<?xml version=""1.0"" encoding=""gb2312""?>" response.write "<aaaa>" response.write "<affff><![CDATA["&"1" response.write "]]></affff><affff2><![CDATA["&"next...."&"]]></affff2><affff3><![CDATA["&"ok"&"]]></affff3><affff4><![CDATA["&"1"&"]]></affff4><affff5><![CDATA["&"1"&"]]></affff5></aaaa>" end if exit function end if rshtm112.close set rshtm112=nothing '---end if ="view" end if class_page_urlsc=class_page_url if makehtm_type="indexpage" or makehtm_type="job" then class_page_url=class_page_url else 'class_page_url可以是1.asp或aa/1/1.asp带子目录形式的 class_page_url=class_page_url&"?"&urmingar&"="&urvaaluee end if per_run_htmed_num=clng(per_run_htmed_num) '缓存路径 CacheTemp=Lcase(trim(request.ServerVariables("SCRIPT_NAME"))) CacheTemp=left(CacheTemp,instrrev(CacheTemp,"/")) CacheTemp=replace(CacheTemp,"\","_") CacheTemp=replace(CacheTemp,"/","_") CacheTemp=nd_admin_cach_varb_name&"cachecls"& CacheTemp Set myCache=new clsCache_b if request("pos")="0" then '============1 call openconnhtm() connhtm.execute("update ND_stutas set b_nofirstrun_a='0'") connhtm.execute("update ND_stutas set b_firstrunb_a='1'") connhtm.execute("delete from ND_htm_hrefs_cacheb") call closeconnhtm() call CompactDB(Server.MapPath(dir_set&nd_ttxa_mdb), "-1") '============1 end if '===================a8 call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_stutas",connhtm,1,1 nofirstruna=clng(rshtm("b_nofirstrun_a")) rshtm.close set rshtm=nothing call closeconnhtm() '==================a8 if nofirstruna=1 then '===================a7 call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_stutas",connhtm,1,1 firstrunb=clng(rshtm("b_firstrunb_a")) rshtm.close set rshtm=nothing call closeconnhtm() '==================a7 end if 'class_page_url可以是1.asp或aa/1/1.asp带子目录形式的 'class_page_url可以是1.asp或aa/1/1.asp带子目录形式的 filenamea=get_qiangzhi_url_cang_main(class_page_url,ndx_cid_var_namex,ndx_pindao_id_var_namex,ndx_zid_var_namex,ndx_viewid_var_namex,"") if is_qiye=1 then weburla="../../"&nd_web_output_folder_qiye&"/"&filenamea htmlfld=nd_webhtml_output_folder_qiye else weburla="../../"&nd_web_output_folder&"/"&filenamea htmlfld=nd_webhtml_output_folder end if weburla2=weburla weburla=GetUrlpath()&RelativePath2RootPathv(weburla) weburlauu=trim(lcase(RelativePath2RootPathv(weburla2))) my_cang_p=RelativePath2RootPathv(weburla) if makehtm_type="job" or makehtm_type="guestbook" or makehtm_type="cpask" or makehtm_type="danartc" or makehtm_type="wdanartc" or makehtm_type="infoback" or makehtm_type="cpbuy" or makehtm_type="zhuanti" or makehtm_type="zhuanti_new" or makehtm_type="class" or makehtm_type="class_new" or makehtm_type="pindao_index" or makehtm_type="pindao_newlist" or makehtm_type="pindao_tjlist" or makehtm_type="pindao_hotlist" or makehtm_type="indexpage" then if nofirstruna=0 then dataax=GetBodyx(weburla) end if else dataax=" " end if 'response.write dataax 'class_page_url只会是aaa/1.asp ,dd/2.asp之类,不会是/aaa/1.asp之类 '提取asp文件名前的目录路径到sfilenameab变量 sfilenamea=replace(class_page_url,"\","/") if instr(1,sfilenamea,"/",1)<>0 then sfilenameab=left(sfilenamea,instrrev(sfilenamea,"/")) else sfilenameab="" end if if nofirstruna=0 then '如不存在html目录则创建html目录 call createfile("../../"&htmlfld&"/testt.txt","1111",true) call deletefile("../../"&htmlfld&"/testt.txt") filenamea_htm=get_md5_htm_filename_by_aspfilename(weburlauu,dataax,htm_ext_ming,1,sfilenameab) redim need_htmled_hrefArraya(999,5) now_htma_pos=0 if makehtm_type="job" or makehtm_type="guestbook" or makehtm_type="cpask" or makehtm_type="danartc" or makehtm_type="wdanartc" or makehtm_type="infoback" or makehtm_type="cpbuy" or makehtm_type="zhuanti" or makehtm_type="zhuanti_new" or makehtm_type="class" or makehtm_type="class_new" or makehtm_type="pindao_index" or makehtm_type="pindao_newlist" or makehtm_type="pindao_tjlist" or makehtm_type="pindao_hotlist" or makehtm_type="indexpage" then call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_htm_hrefs_cacheb",connhtm,1,3 rshtm.addnew rshtm("other_or_self")="self_asp" rshtm("jichu_dizhi")=class_page_url rshtm("asp_path")=weburlauu rshtm("htm_path")=filenamea_htm rshtm("is_htmed")="1" rshtm.update rshtm.close set rshtm=nothing call closeconnhtm() end if '===================111 if makehtm_type="view" then call openconnhtm() set rshtm11=server.CreateObject("adodb.recordset") rshtm11.open "select * from "&nd_view_biao_n_x&" where classid='"&ccccid&"'",conn,1,1 do while not rshtm11.eof class_page_url22=class_page_urlsc&"?"&urmingar&"="&rshtm11("id") filenameak=get_qiangzhi_url_cang_main(class_page_url22,ndx_cid_var_namex,ndx_pindao_id_var_namex,ndx_zid_var_namex,ndx_viewid_var_namex,"") if is_qiye=1 then weburlak="../../"&nd_web_output_folder_qiye&"/"&filenameak else weburlak="../../"&nd_web_output_folder&"/"&filenameak end if weburla2k=weburlak weburlak=GetUrlpath()&RelativePath2RootPathv(weburlak) weburlauuk=trim(lcase(RelativePath2RootPathv(weburla2k))) filenamea_htmk=get_md5_htm_filename_by_aspfilename(weburlauuk," ",htm_ext_ming,1,sfilenameab) set rshtm111=server.CreateObject("adodb.recordset") rshtm111.open "select * from ND_htm_hrefs_cacheb where asp_path='"&weburlauuk&"' or htm_path='"&filenamea_htmk&"'",connhtm,1,3 if rshtm111.eof then rshtm111.addnew rshtm111("other_or_self")="self_asp" rshtm111("jichu_dizhi")=class_page_url22 rshtm111("asp_path")=weburlauuk rshtm111("htm_path")=filenamea_htmk rshtm111("is_htmed")="0" rshtm111.update end if rshtm111.close set rshtm111=nothing rshtm11.movenext loop rshtm11.close set rshtm11=nothing call closeconnhtm() end if '===================111 '===================111b if makehtm_type="view_new" then set filea=new Cls_FSO call openconnhtm() set rshtm11=server.CreateObject("adodb.recordset") rshtm11.open "select * from "&nd_view_biao_n_x&" where classid='"&ccccid&"'",conn,1,1 do while not rshtm11.eof class_page_url22=class_page_urlsc&"?"&urmingar&"="&rshtm11("id") filenameak=get_qiangzhi_url_cang_main(class_page_url22,ndx_cid_var_namex,ndx_pindao_id_var_namex,ndx_zid_var_namex,ndx_viewid_var_namex,"") if is_qiye=1 then weburlak="../../"&nd_web_output_folder_qiye&"/"&filenameak else weburlak="../../"&nd_web_output_folder&"/"&filenameak end if weburla2k=weburlak weburlak=GetUrlpath()&RelativePath2RootPathv(weburlak) weburlauuk=trim(lcase(RelativePath2RootPathv(weburla2k))) filenamea_htmk=get_md5_htm_filename_by_aspfilename(weburlauuk," ",htm_ext_ming,1,sfilenameab) cishtmedda="0" stotyryy="../../"&htmlfld&"/"&sfilenameab&filenamea_htmk if filea.ReportFileStatus(server.mappath(stotyryy))=1 then tsssthtmmt=loadfile(stotyryy) pos_cnt_1a=instr(1,tsssthtmmt,"<!--last publish time:",1) pos_cnt_1a_1=pos_cnt_1a+len("<!--last publish time:") pos_cnt_2a=instr(1,tsssthtmmt,",publish by newdsoft",1) if pos_cnt_1a<>0 and pos_cnt_2a<>0 then timehtmaa=mid(tsssthtmmt,pos_cnt_1a_1,pos_cnt_2a-pos_cnt_1a_1) if timehtmaa<>"" and isdate(timehtmaa)=true then shjiupdatm=rshtm11("update_time_for_make_html") if cstr(shjiupdatm&"")<>"" then if datediff("n",shjiupdatm,cdate(timehtmaa))<0 or (datediff("n",shjiupdatm,cdate(timehtmaa))=0 and second(shjiupdatm)>=second(cdate(timehtmaa))) then cishtmedda="0" else cishtmedda="1" end if else cishtmedda="0" end if else cishtmedda="0" end if else cishtmedda="0" end if else cishtmedda="0" end if set rshtm111=server.CreateObject("adodb.recordset") rshtm111.open "select * from ND_htm_hrefs_cacheb where asp_path='"&weburlauuk&"' or htm_path='"&filenamea_htmk&"'",connhtm,1,3 if rshtm111.eof then rshtm111.addnew rshtm111("other_or_self")="self_asp" rshtm111("jichu_dizhi")=class_page_url22 rshtm111("asp_path")=weburlauuk rshtm111("htm_path")=filenamea_htmk rshtm111("is_htmed")=cishtmedda rshtm111.update end if rshtm111.close set rshtm111=nothing rshtm11.movenext loop rshtm11.close set rshtm11=nothing call closeconnhtm() end if '===================111b '===================2 now_asp_ppppt=filenamea have_htmedok_num=0 if makehtm_type="job" or makehtm_type="guestbook" or makehtm_type="cpask" or makehtm_type="danartc" or makehtm_type="wdanartc" or makehtm_type="infoback" or makehtm_type="cpbuy" or makehtm_type="zhuanti" or makehtm_type="zhuanti_new" or makehtm_type="class" or makehtm_type="class_new" or makehtm_type="pindao_index" or makehtm_type="pindao_newlist" or makehtm_type="pindao_tjlist" or makehtm_type="pindao_hotlist" or makehtm_type="indexpage" then firstrunb=1 else firstrunb=0 end if end if have_need_htmed=1 run_htmed_count=0 had_ended=0 do while have_need_htmed=1 have_need_htmed=0 need_tiaoga=0 run_htmed_count=run_htmed_count+1 fnd_htm_fl_posa=-123 if firstrunb=1 then firstrunb=0 else '===================3 call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_htm_hrefs_cacheb where other_or_self='self_asp' and htm_path<>'' and is_htmed='0'",connhtm,1,1 hhhvd_sx=0 if not rshtm.eof then datss_1=rshtm("other_or_self") datss_2=rshtm("jichu_dizhi") datss_3=trim(rshtm("asp_path")) datss_4=rshtm("htm_path") datss_4ss=datss_4 datss_5=rshtm("is_htmed") hhhvd_sx=1 nnnnow_rs_iid=rshtm("id") end if rshtm.close set rshtm=nothing call closeconnhtm() if hhhvd_sx=1 then '===================3 '----- datss_31=replace(datss_3,"\","/") if instr(1,datss_31,"/",1)<>0 then datss_31=mid(datss_31,instrrev(datss_31,"/")+1,len(datss_31)-(instrrev(datss_31,"/")+1)+1) end if if instr(1,datss_31,"?",1)<>0 then sfilename=left(datss_31,instr(1,datss_31,"?",1)-1) else sfilename=datss_31 end if sfilename=replace(sfilename,"\","/") if instr(1,sfilename,"/",1)<>0 then sfilename=mid(sfilename,instrrev(sfilename,"/")+1,len(sfilename)-(instrrev(sfilename,"/")+1)+1) end if ftypppe1=get_file_type(sfilename) doit_mode="no" doit_mode=get_url_mode_to_make_html(ftypppe1) '----- mke_ita=0 ' danartc单篇文章频道内的页有可能无id,而只有cid,故: if makehtm_type="indexpage" or makehtm_type="job" or makehtm_type="danartc" then mke_ita=1 have_need_htmed=1 else if ccccid="" then mke_ita=0 else cid_lista=split(ccccid,",") for cidii=0 to ubound(cid_lista) 'if datss_3 cid_zhi=cstr(cid_lista(cidii)) if makehtm_type="class" or makehtm_type="class_new" then if ndx_cid_var_namex="" then '默认分类id的url参数名 cid_v="cid" else cid_v=ndx_cid_var_namex end if if instr(1,datss_3,"&"&cid_v&"="&cid_zhi,1)<>0 or instr(1,datss_3,"?"&cid_v&"="&cid_zhi,1)<>0 then mke_ita=1 have_need_htmed=1 exit for end if end if if makehtm_type="zhuanti" or makehtm_type="zhuanti_new" then if ndx_zid_var_namex="" then '默认分类id的url参数名 cid_v="zid" else cid_v=ndx_zid_var_namex end if if instr(1,datss_3,"&"&cid_v&"="&cid_zhi,1)<>0 or instr(1,datss_3,"?"&cid_v&"="&cid_zhi,1)<>0 then mke_ita=1 have_need_htmed=1 exit for end if end if if makehtm_type="pindao_index" or makehtm_type="pindao_newlist" or makehtm_type="pindao_tjlist" or makehtm_type="pindao_hotlist" then if ndx_pindao_id_var_namex="" then '默认分类id的url参数名 cid_v="id" else cid_v=ndx_pindao_id_var_namex end if if instr(1,datss_3,"&"&cid_v&"="&cid_zhi,1)<>0 or instr(1,datss_3,"?"&cid_v&"="&cid_zhi,1)<>0 then mke_ita=1 have_need_htmed=1 exit for end if end if if makehtm_type="guestbook" or makehtm_type="cpask" or makehtm_type="wdanartc" or makehtm_type="infoback" or makehtm_type="cpbuy" then if ndx_pindao_id_var_namex="" then '默认分类id的url参数名 cid_v="id" else cid_v=ndx_pindao_id_var_namex end if if instr(1,datss_3,"&"&cid_v&"="&cid_zhi,1)<>0 or instr(1,datss_3,"?"&cid_v&"="&cid_zhi,1)<>0 then mke_ita=1 have_need_htmed=1 exit for end if end if if makehtm_type="view" then if ndx_viewid_var_namex="" then '默认分类id的url参数名 urla_minga="arid" else urla_minga=ndx_viewid_var_namex end if value_getttdd="" ddflnme=datss_3 '-------1 if instr(1,ddflnme,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,ddflnme,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(ddflnme) if mid(ddflnme,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(ddflnme) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(ddflnme) then valuuue="" else valuuue=mid(ddflnme,orrg,psspo1_1_1-orrg) end if value_getttdd=valuuue end if '-------1 '-------1_1 if instr(1,ddflnme,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,ddflnme,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(ddflnme) if mid(ddflnme,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(ddflnme) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(ddflnme) then valuuue="" else valuuue=mid(ddflnme,orrg,psspo1_1_1-orrg) end if value_getttdd=valuuue end if '-------1_1 value_getttdd=cstr(value_getttdd&"") if value_getttdd<>"" and isnumeric(value_getttdd)=true then set rsccx=server.CreateObject("adodb.recordset") rsccx.open"select * from "&nd_view_biao_n_x&" where id="&value_getttdd,conn,1,1 if not rsccx.eof then ccidgtt=rsccx("classid") if cstr(ccidgtt)=cstr(cid_zhi) then mke_ita=1 have_need_htmed=1 exit for end if end if end if end if if makehtm_type="view_new" then if ndx_viewid_var_namex="" then '默认分类id的url参数名 urla_minga="arid" else urla_minga=ndx_viewid_var_namex end if value_getttdd="" ddflnme=datss_3 '-------1 if instr(1,ddflnme,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,ddflnme,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(ddflnme) if mid(ddflnme,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(ddflnme) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(ddflnme) then valuuue="" else valuuue=mid(ddflnme,orrg,psspo1_1_1-orrg) end if value_getttdd=valuuue end if '-------1 '-------1_1 if instr(1,ddflnme,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,ddflnme,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(ddflnme) if mid(ddflnme,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(ddflnme) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(ddflnme) then valuuue="" else valuuue=mid(ddflnme,orrg,psspo1_1_1-orrg) end if value_getttdd=valuuue end if '-------1_1 value_getttdd=cstr(value_getttdd&"") if value_getttdd<>"" and isnumeric(value_getttdd)=true then set rsccx=server.CreateObject("adodb.recordset") rsccx.open"select * from "&nd_view_biao_n_x&" where id="&value_getttdd,conn,1,1 if not rsccx.eof then ccidgtt=rsccx("classid") shjiupdatm=rsccx("update_time_for_make_html") if cstr(ccidgtt)=cstr(cid_zhi) then '---------------dttt class_page_urlq=mid(datss_3,2,len(datss_3)) if instr(1,class_page_urlq,"?",1)<>0 then if instr(1,class_page_urlq,"?",1)=1 then class_page_urlq="" else class_page_urlq=mid(class_page_urlq,1,instr(1,class_page_urlq,"?",1)-1) end if end if if is_qiye=1 then weburla22=nd_web_output_folder_qiye&"/" else weburla22=nd_web_output_folder&"/" end if 'class_page_url只会是aaa/1.asp ,dd/2.asp之类,不会是/aaa/1.asp之类 '提取asp文件名前的目录路径到sfilenameab变量 sfilenameaq=replace(class_page_urlq,"\","/") sfilenameab="" if instr(1,sfilenameaq,"/",1)<>0 then sfilenameab=left(sfilenameaq,instrrev(sfilenameaq,"/")) else sfilenameab="" end if if lcase(left(sfilenameab,len(weburla22)))=lcase(weburla22) then if len(weburla22)+1>len(sfilenameab) then sfilenameab="" else sfilenameab=mid(sfilenameab,len(weburla22)+1,len(sfilenameab)-(len(weburla22)+1)+1) end if end if set filea=new Cls_FSO cishtmedda="0" stotyryy="../../"&htmlfld&"/"&sfilenameab&datss_4ss if filea.ReportFileStatus(server.mappath(stotyryy))=1 then tsssthtmmt=loadfile(stotyryy) pos_cnt_1a=instr(1,tsssthtmmt,"<!--last publish time:",1) pos_cnt_1a_1=pos_cnt_1a+len("<!--last publish time:") pos_cnt_2a=instr(1,tsssthtmmt,",publish by newdsoft",1) if pos_cnt_1a<>0 and pos_cnt_2a<>0 then timehtmaa=mid(tsssthtmmt,pos_cnt_1a_1,pos_cnt_2a-pos_cnt_1a_1) if timehtmaa<>"" and isdate(timehtmaa)=true then 'if cstr(shjiupdatm&"")="" or datediff("s",shjiupdatm,cdate(timehtmaa))<=0 then 'if cstr(shjiupdatm&"")="" or datediff("s",shjiupdatm,cdate(timehtmaa))<=0 then if cstr(shjiupdatm&"")<>"" then if datediff("n",shjiupdatm,cdate(timehtmaa))<0 or (datediff("n",shjiupdatm,cdate(timehtmaa))=0 and second(shjiupdatm)>=second(cdate(timehtmaa))) then cishtmedda="0" else cishtmedda="1" end if else cishtmedda="0" end if else cishtmedda="0" end if else cishtmedda="0" end if else cishtmedda="0" end if '---------------dttt if cishtmedda="0" then mke_ita=1 have_need_htmed=1 exit for end if end if end if end if end if 'if ndx_pindao_id_var_namex="" then '默认频道id的url参数名 'pdid_v="id" 'else 'pdid_v=ndx_pindao_id_var_namex 'end if next if mke_ita=0 and is_htmed_other_aspfile<>1 then need_tiaoga=1 call openconnhtm() connhtm.execute("update ND_htm_hrefs_cacheb set is_htmed='1' where htm_path='"&datss_4ss&"'") call closeconnhtm() have_need_htmed=1 end if end if end if if mke_ita=1 then now_asp_ppppt=sfilenameab&datss_3 'if is_qiye=1 then 'weburlaa="../../"&nd_web_output_folder_qiye&"/"&sfilenameab&datss_3 'else 'weburlaa="../../"&nd_web_output_folder&"/"&sfilenameab&datss_3 'end if weburlaa=GetUrlpath()&datss_3 my_cang_p=datss_3 '提取当前asp文件名前的目录路径到sfilenameab变量,目录路径已去掉xndasp/或xcomasp/之类的前缀: '提取当前asp文件名前的目录路径到sfilenameab变量,目录路径已去掉xndasp/或xcomasp/之类的前缀: '==1== class_page_url=mid(datss_3,2,len(datss_3)) if instr(1,class_page_url,"?",1)<>0 then if instr(1,class_page_url,"?",1)=1 then class_page_url="" else class_page_url=mid(class_page_url,1,instr(1,class_page_url,"?",1)-1) end if end if class_page_urlcc=replace(class_page_url,"\","/") if instr(1,class_page_urlcc,"/",1)<>0 then if instrrev(class_page_urlcc,"/")+1<=len(class_page_urlcc) then class_page_urlbvv=mid(class_page_urlcc,instrrev(class_page_urlcc,"/")+1,len(class_page_urlcc)-(instrrev(class_page_urlcc,"/")+1)+1) else class_page_urlbvv="" end if else class_page_urlbvv=class_page_urlcc end if if is_qiye=1 then weburla22=nd_web_output_folder_qiye&"/" else weburla22=nd_web_output_folder&"/" end if 'class_page_url只会是aaa/1.asp ,dd/2.asp之类,不会是/aaa/1.asp之类 '提取asp文件名前的目录路径到sfilenameab变量 sfilenamea=replace(class_page_url,"\","/") sfilenameab="" if instr(1,sfilenamea,"/",1)<>0 then sfilenameab=left(sfilenamea,instrrev(sfilenamea,"/")) else sfilenameab="" end if if lcase(left(sfilenameab,len(weburla22)))=lcase(weburla22) then if len(weburla22)+1>len(sfilenameab) then sfilenameab="" else sfilenameab=mid(sfilenameab,len(weburla22)+1,len(sfilenameab)-(len(weburla22)+1)+1) end if end if class_page_url=sfilenameab&class_page_urlbvv '==1== dataax=GetBodyx(weburlaa) encodeingxxxhh=encodeingxxx filenamea_htm=datss_4 '================a1 fnd_htm_fl_posa=1 '================a1 end if end if have_need_htmed_other=0 '生成/xasp/内的与自己非同名的其他asp页的htm,注意只搜索/xasp/内的asp页 if have_need_htmed=0 and is_htmed_other_aspfile=1 then '===================3 call openconnhtm() set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_htm_hrefs_cacheb where other_or_self='other_asp' and htm_path<>'' and is_htmed='0'",connhtm,1,1 hhhvd_sx=0 if not rshtm.eof then datss_1=rshtm("other_or_self") datss_2=rshtm("jichu_dizhi") datss_3=trim(rshtm("asp_path")) datss_4=rshtm("htm_path") datss_5=rshtm("is_htmed") hhhvd_sx=1 nnnnow_rs_iid=rshtm("id") end if rshtm.close set rshtm=nothing call closeconnhtm() '===================3 if hhhvd_sx=1 then have_need_htmed=1 have_need_htmed_other=1 now_asp_ppppt=datss_3 weburlaa=GetUrlpath()&datss_3 my_cang_p=datss_3 '----- datss_31=replace(datss_3,"\","/") if instr(1,datss_31,"/",1)<>0 then datss_31=mid(datss_31,instrrev(datss_31,"/")+1,len(datss_31)-(instrrev(datss_31,"/")+1)+1) end if if instr(1,datss_31,"?",1)<>0 then sfilename=left(datss_31,instr(1,datss_31,"?",1)-1) else sfilename=datss_31 end if sfilename=replace(sfilename,"\","/") if instr(1,sfilename,"/",1)<>0 then sfilename=mid(sfilename,instrrev(sfilename,"/")+1,len(sfilename)-(instrrev(sfilename,"/")+1)+1) end if ftypppe1=get_file_type(sfilename) doit_mode="no" doit_mode=get_url_mode_to_make_html(ftypppe1) '----- '提取当前asp文件名前的目录路径到sfilenameab变量,目录路径已去掉xndasp/或xcomasp/之类的前缀: '提取当前asp文件名前的目录路径到sfilenameab变量,目录路径已去掉xndasp/或xcomasp/之类的前缀: '==1== class_page_url=mid(datss_3,2,len(datss_3)) if instr(1,class_page_url,"?",1)<>0 then if instr(1,class_page_url,"?",1)=1 then class_page_url="" else class_page_url=mid(class_page_url,1,instr(1,class_page_url,"?",1)-1) end if end if class_page_urlcc=replace(class_page_url,"\","/") if instr(1,class_page_urlcc,"/",1)<>0 then if instrrev(class_page_urlcc,"/")+1<=len(class_page_urlcc) then class_page_urlbvv=mid(class_page_urlcc,instrrev(class_page_urlcc,"/")+1,len(class_page_urlcc)-(instrrev(class_page_urlcc,"/")+1)+1) else class_page_urlbvv="" end if else class_page_urlbvv=class_page_urlcc end if if is_qiye=1 then weburla22=nd_web_output_folder_qiye&"/" else weburla22=nd_web_output_folder&"/" end if 'class_page_url只会是aaa/1.asp ,dd/2.asp之类,不会是/aaa/1.asp之类 '提取asp文件名前的目录路径到sfilenameab变量 sfilenamea=replace(class_page_url,"\","/") sfilenameab="" if instr(1,sfilenamea,"/",1)<>0 then sfilenameab=left(sfilenamea,instrrev(sfilenamea,"/")) else sfilenameab="" end if if lcase(left(sfilenameab,len(weburla22)))=lcase(weburla22) then if len(weburla22)+1>len(sfilenameab) then sfilenameab="" else sfilenameab=mid(sfilenameab,len(weburla22)+1,len(sfilenameab)-(len(weburla22)+1)+1) end if end if class_page_url=sfilenameab&class_page_urlbvv '==1== dataax=GetBodyx(weburlaa) encodeingxxxhh=encodeingxxx filenamea_htm=datss_4 '================a1 fnd_htm_fl_posa=1 '================a1 end if end if if have_need_htmed=0 then had_ended=1 exit do end if end if if need_tiaoga=0 then connntxx=get_need_htmled_hrefArray_from_a_page_x_cid(dataax,cid_var_name,pindao_id_var_name,cid,class_page_url,pindao_id,htm_ext_ming,is_qiye) need_htmled_hrefArraya_1=split(need_href_array,"$$need_htmed_aspcpu121$$") lennehtm=ubound(need_htmled_hrefArraya_1) is_redirect_page=0 '==================panduan is_redirect_page============= if lennehtm>=2 then '是否此链接进入后会response.redirect到另一页 Randomize '初始化随机数生成器。 iposhtss=rnd(255)*lennehtm need_htmled_1=split(need_htmled_hrefArraya_1(iposhtss),"$x$1$,$1$x$") need_htmled_1_1=need_htmled_1(0) need_htmled_1_2=need_htmled_1(1) need_htmled_1_3=need_htmled_1(2) need_htmled_1_4=need_htmled_1(3) weburlaa=GetUrlpath()&need_htmled_1_3 dataaxx1=GetBodyx(weburlaa) if nd_http_200ed_ok=0 then Randomize '初始化随机数生成器。 iposhtss=rnd(255)*lennehtm need_htmled_1=split(need_htmled_hrefArraya_1(iposhtss),"$x$1$,$1$x$") need_htmled_1_1=need_htmled_1(0) need_htmled_1_2=need_htmled_1(1) need_htmled_1_3=need_htmled_1(2) need_htmled_1_4=need_htmled_1(3) weburlaa=GetUrlpath()&need_htmled_1_3 dataaxx1=GetBodyx(weburlaa) if nd_http_200ed_ok=0 then is_redirect_page=1 connntxx="此页是response.redirect而重定向来的页面,所有相对链接的基地址已重定向,无法判断,舍去" encodeingxxx="gb2312" end if end if end if if is_redirect_page=0 then '==================end is_redirect_page============= '===================4 call openconnhtm() for iposht=0 to lennehtm need_htmled_1=split(need_htmled_hrefArraya_1(iposht),"$x$1$,$1$x$") need_htmled_1_1=need_htmled_1(0) need_htmled_1_2=need_htmled_1(1) need_htmled_1_3=need_htmled_1(2) need_htmled_1_4=need_htmled_1(3) is_haved_filea=0 '排除重复的文件 set rshtm2=server.CreateObject("adodb.recordset") rshtm2.open "select * from ND_htm_hrefs_cacheb where htm_path='"&need_htmled_1_4&"'",connhtm,1,1 if not rshtm2.eof then is_haved_filea=1 end if rshtm2.close set rshtm2=nothing 'end 排除重复的文件 if is_haved_filea=0 then if (is_htmed_other_aspfile<>1 and need_htmled_1_1="self_asp") or is_htmed_other_aspfile=1 then set rshtm=server.CreateObject("adodb.recordset") rshtm.open "select * from ND_htm_hrefs_cacheb",connhtm,1,3 rshtm.addnew rshtm("other_or_self")=need_htmled_1_1 rshtm("jichu_dizhi")=need_htmled_1_2 rshtm("asp_path")=need_htmled_1_3 rshtm("htm_path")=need_htmled_1_4 rshtm("is_htmed")="0" rshtm.update rshtm.close set rshtm=nothing end if end if next call closeconnhtm() end if cur_bianma=encodeingxxxhh connntxx=get_all_html_s_ajax(connntxx,channel_typea,my_cang_p) '写入htm文件 connntxx="<!--last publish time:"&cstr(now())&",publish by newdsoft cms system-->"&connntxx call createfile("../../"&htmlfld&"/"&sfilenameab&filenamea_htm,connntxx,true) have_htmedok_num=have_htmedok_num+1 '=============a2 if firstrunb=0 and fnd_htm_fl_posa<>-123 then call openconnhtm() connhtm.execute("update ND_htm_hrefs_cacheb set is_htmed='1' where id="&nnnnow_rs_iid) call closeconnhtm() end if '=============a2 if run_htmed_count>per_run_htmed_num then exit do end if loop '=============a3 call openconnhtm() set rshtm2=server.CreateObject("adodb.recordset") rshtm2.open "select count(*) from ND_htm_hrefs_cacheb where is_htmed='1'",connhtm,1,1 if not rshtm2.eof then have_htmedok_num=rshtm2(0) end if rshtm2.close set rshtm2=nothing set rshtm2=server.CreateObject("adodb.recordset") rshtm2.open "select count(*) from ND_htm_hrefs_cacheb where asp_path like '%"&class_page_urlsc&"%'",connhtm,1,1 if not rshtm2.eof then now_htma_pos=rshtm2(0) end if rshtm2.close set rshtm2=nothing call closeconnhtm() '=============a3 '=============a5 call openconnhtm() connhtm.execute("update ND_stutas set b_nofirstrun_a='1'") connhtm.execute("update ND_stutas set b_firstrunb_a='"&cstr(firstrunb)&"'") call closeconnhtm() '=============a5 set myCache=nothing if debug_on="off" then response.ContentType="text/xml" response.write "<?xml version=""1.0"" encoding=""gb2312""?>" response.write "<aaaa>" response.write "<affff><![CDATA["&cstr(had_ended) response.write "]]></affff><affff2><![CDATA["&now_asp_ppppt&"]]></affff2><affff3><![CDATA["&"ok"&"]]></affff3><affff4><![CDATA["&cstr(now_htma_pos)&"]]></affff4><affff5><![CDATA["&cstr(have_htmedok_num)&"]]></affff5></aaaa>" end if end Function function find_url_zhi(my_cang_paaaa,ming) my_cang_paaaa=replace(my_cang_paaaa,"\","/") if instr(1,my_cang_paaaa,"/",1)<>0 then my_cang_paaaa=mid(my_cang_paaaa,instrrev(my_cang_paaaa,"/")+1,len(my_cang_paaaa)-(instrrev(my_cang_paaaa,"/")+1)+1) end if if instr(1,my_cang_paaaa,"?",1)=0 then find_url_zhi="" exit function end if if instr(1,my_cang_paaaa,"?",1)<>0 and len(my_cang_paaaa)>=instr(1,my_cang_paaaa,"?",1)+1 then urlcan=mid(my_cang_paaaa,instr(1,my_cang_paaaa,"?",1)+1,len(my_cang_paaaa)-instr(1,my_cang_paaaa,"?",1)) else urlcan="" end if Fy_Url1=urlcan Fy_a1=split(Fy_Url1,"&") redim canming(ubound(Fy_a1)+1) redim canvalue(ubound(Fy_a1)+1) lenttt=ubound(Fy_a1) for Fy_x1=0 to ubound(Fy_a1) if instr(Fy_a1(Fy_x1),"=")=len(Fy_a1(Fy_x1)) then Fy_v ="" else Fy_v = mid(Fy_a1(Fy_x1),instr(Fy_a1(Fy_x1),"=")+1,len(Fy_a1(Fy_x1))) end if Fy_Cs_name= left(Fy_a1(Fy_x1),instr(Fy_a1(Fy_x1),"=")-1) canming(Fy_x1)=Fy_Cs_name canvalue(Fy_x1)=Fy_v Next find_url_zhi="" for ntofnd1=0 to lenttt if lcase(trim(canming(ntofnd1)))=lcase(trim(ming)) then find_url_zhi=canvalue(ntofnd1) exit for end if next end Function Function Re_Replace2(retxt) Re_Replace2 = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(retxt, "[", "\["), "]", "\]"), "(", "\("), ")", "\)"), "$", "\$"), "^", "\^"), "{", "\{"), "}", "\}"), "+", "\+"), ".", "\."), "<", "\<"), ">", "\>"), "-", "\-") End Function function get_all_html_s_ajax(contt,channel_typea,my_cang_paa) now_dingcen_labelname="" now_dingcen_params="" now_dingcen_label_s_pos=-123 now_dingcen_label_e_pos=-122 my_cang_paac=my_cang_paa havssssaaaqw="" havzmled="" xuhao_fangzhichongfu_js=0 get_all_html_s_ajax=contt nowiiposs=1 have_ajaxaa=1 do while have_ajaxaa=1 have_ajaxaa=0 '------------v1.2------------------ call nd_process_sleep(nd_sleep_x_times_b) '------------v1.2------------------ ssass1="<!--nd_complie_linkx_start:[$$" ssa1=instr(nowiiposs,contt,ssass1,1) start_a_1=ssa1 '找到<!--nd_complie_linkx_start:[$$ if ssa1<>0 then pos_ab1=-123 for ssa2=0 to 999 if ssa1+len(ssass1)>len(contt) then exit for if mid(contt,ssa1+len(ssass1)+ssa2,6)="]xx-->" then pos_ab1=ssa1+len(ssass1)+ssa2 pos_ab11=pos_ab1 exit for end if next '找到]xx--> if pos_ab1<>-123 then have_ajaxaa=1 lable_strr=mid(contt,ssa1+len(ssass1),pos_ab1-(ssa1+len(ssass1))) pos_ab1=-123 for ssa22=1 to 999 if ssa22>len(lable_strr) then exit for if mid(lable_strr,ssa22,1)="(" then pos_ab1=ssa22 exit for end if next if pos_ab1=-123 then 'error nowiiposs=pos_ab11+6 end if '找到( if pos_ab1<>-123 and pos_ab1-1>=1 then pos_ab1aa=start_a_1 lable_nname=lcase(mid(lable_strr,1,pos_ab1-1)) lable_paramee=mid(lable_strr,pos_ab1,len(lable_strr)-1) lable_paramee=mid(lable_paramee,2,len(lable_paramee)-2+1-1) set Rs44s=server.CreateObject("adodb.recordset") sql="select * from [ND_label_cache] where lcase(label_name)='"&lable_nname&"'" Rs44s.open sql,conn,1,1 if Rs44s.eof then Rs44s.close set Rs44s=nothing enndsttr="<!--nd_complie_linkx_end:[$$"&lable_nname&"("&lable_paramee&")]xx-->" enndiiposs=instr(pos_ab1aa,contt,enndsttr,1) 'nowiiposs=enndiiposs+len(enndsttr) nowiiposs=pos_ab11+6 else xuhao_fangzhichongfu_js=xuhao_fangzhichongfu_js+1 enndsttr="<!--nd_complie_linkx_end:[$$"&lable_nname&"("&lable_paramee&")]xx-->" enndiiposs=instr(pos_ab1aa,contt,enndsttr,1) 'nowiiposs=enndiiposs+len(enndsttr) nowiiposs=pos_ab11+6 ennd_a_1=enndiiposs+len(enndsttr)-1 if ssa1>now_dingcen_label_e_pos then now_dingcen_labelname=lable_nname now_dingcen_params=lable_paramee now_dingcen_label_s_pos=ssa1 now_dingcen_label_e_pos=enndiiposs end if ltype=rs44s("label_type") lname=rs44s("label_name") codeb=rs44s("label_code") lsql=rs44s("label_sql") lpath=rs44s("label_full_path_name") lparams=rs44s("label_params") label_fenye_num=rs44s("label_fenye_num") label_beizhu=rs44s("label_beizhu") is_sys_label=rs44s("is_sys_label") label_other_params=replace_when_complie(rs44s("label_other_params")) Rs44s.close set Rs44s=nothing htmledxb=find_other_param("htmledxb",label_other_params) htmledxa=find_other_param("htmledxa",label_other_params) if htmledxa="" then htmledxa="1" htmledxax=clng(htmledxa) 'if htmledxb="" then htmledxb="" sssazxaxx=htmledxb if sssazxaxx<>"" then sssazxa2=split(sssazxaxx,"$123$121$aspndcpu232$321$") sttrattr="<!--nd_complie_linkx_start:[$$"&lable_nname&"("&lable_paramee&")]xx-->" enndsttr="<!--nd_complie_linkx_end:[$$"&lable_nname&"("&lable_paramee&")]xx-->" if start_a_1-1+len(sttrattr)>=1 then qian_aaa=mid(contt,1,start_a_1-1+len(sttrattr)) else qian_aaa="" end if if ennd_a_1+1-len(enndsttr)-1<=len(contt) then after_aaa=mid(contt,ennd_a_1+1-len(enndsttr),len(contt)-(ennd_a_1+1-len(enndsttr))+1) else after_aaa="" end if my_aaa=mid(contt,start_a_1-1+len(sttrattr)+1,(ennd_a_1+1-len(enndsttr)-1)-(start_a_1-1+len(sttrattr)+1)+1) 'if err then ' response.Write start_a_1&"<hr>"&(ennd_a_1) 'response.end ' end if old_d_len=len(my_aaa) for qdddpa=0 to ubound(sssazxa2) sssazxa2_1=sssazxa2(qdddpa) sssazxa3=split(sssazxa2_1,"$123$121$accndcpu232$321$") sssazxa3_1=replace_when_complie(replace(sssazxa3(0),chr(34),"")) sssazxa3_2=replace_when_complie(replace(sssazxa3(1),chr(34),"")) 'html.replace(...,"$ajax_start$ 不能为 标签参数含$xx_var_asp$i之类的标签 生成其ajax的js文件调用,请去掉标签参数里的$xx_var_asp$i之类的参数") if htmledxax=2 then nowiiposs=pos_ab11+6 end if if htmledxax=1 or htmledxax=3 then '----------qqq1------------------ zhongjian_ajax_asp_cont=loadfile("../../inc/ND_ajax_zhong_asp_template.asp") ptypelib=loadfile("../../inc/ND_moban_page_type.asp") zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$include_ND_moban_page_type.asp$",ptypelib) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$db_str$",main_data_mdb) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$is_qiye$",cstr(nddd_is_qiye)) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$output_folder_qiye$",nd_web_output_folder_qiye) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$output_folder$",nd_web_output_folder) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_admin_login_status_cache$",nd_admin_cach_varb_name) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_mx_complie_temlete_size$",nd_mx_complie_temlete_size) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_web_admin_folder$",nd_web_admin_folder) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_webhtml_output_folder$",nd_webhtml_output_folder) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_webhtml_output_folder_qiye$",nd_webhtml_output_folder_qiye) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$fssoo_nd_var_str_x_customx$",fssoo_nd_var_str_x_customx) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$iscrtfile$$",iscrtfile) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$w_web_config_template$$",w_web_config_template) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$w_files_config$$",w_files_config) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$w_files_config_template$$",w_files_config_template) nnnmdd5=loadfile("../../inc/new_md5.asp") zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$md5.asp$",nnnmdd5) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$ndxx_fang_caiji_rand_str_x$$",nd_fang_caiji_rand_str_x) if clng(nddd_is_qiye)=1 then weburla="../../"&nd_web_output_folder_qiye&"/" htmlfld=nd_webhtml_output_folder_qiye else weburla="../../"&nd_web_output_folder&"/" htmlfld=nd_webhtml_output_folder end if '写入nd_js_ajax_kernel_zhongjian_asp_reader_x.asp文件 ttmpffilea="nd_js_ajax_kernel_zhongjian_asp_reader_x.asp" if havssssaaaqw="" then havssssaaaqw="1" call createfile("../../"&htmlfld&"/"&ttmpffilea,zhongjian_ajax_asp_cont,true) end if content2="{$$"&now_dingcen_labelname&"("&now_dingcen_params&")"&"}" 'h_curfile="xxxfirstned"很重要 h_curfile="xxxfirstned" complie_dir="../../"&nd_web_admin_folder&"/"&"adminKernel/" if cstr(nddd_is_qiye)="1" then cpml_is_cms=0 else cpml_is_cms=1 end if ajax_exe_asp=replace_label_main(content2,"sys/sys123.asp") Randomize '初始化随机数生成器。 rnddd = cstr(clng(Rnd(255)*99999)+200)&cstr(clng(Rnd(255)*99999)+100)&cstr(clng(Rnd(255)*99999)+1) '产生随机数 div_namea="nd_div_x_"&rnddd js_ajax_a_t_file="nd_js_ajax_kernel_label_x_"&now_dingcen_labelname&"_"&md5(now_dingcen_params)&".asp" call createfile("../../"&htmlfld&"/"&js_ajax_a_t_file,ajax_exe_asp,true) js_ajax_conta=loadfile("../../inc/ND_js_html_ajax_template.asp") cang_ss_a=split(now_dingcen_params,",") errvvvaar=0 ajax_asp_file_url_cang="" for iccca=0 to ubound(cang_ss_a) dttass1=trim(cang_ss_a(iccca)) if left(dttass1,16)="$xx_request_asp$" then cang_mma=mid(dttass1,17,len(dttass1)-17+1) cang_vva=find_url_zhi(my_cang_paa,cang_mma) ajax_asp_file_url_cang=ajax_asp_file_url_cang&cang_mma&"="&cang_vva&"&" end if if left(dttass1,12)="$xx_var_asp$" then errvvvaar=1 exit for end if next if ajax_asp_file_url_cang<>"" then ajax_asp_file_url_cang=left(ajax_asp_file_url_cang,len(ajax_asp_file_url_cang)-1) ajax_asp_file_url_cang=replace(ajax_asp_file_url_cang,"=","$denghaoaspcpu1$") ajax_asp_file_url_cang=replace(ajax_asp_file_url_cang,"&","$adnnhaoaspcpu1$") ajax_asp_file_url_cang=replace(ajax_asp_file_url_cang,"?","$wnnehaoaspcpu1$") if clng(nddd_is_qiye)=1 then weburla="../../"&nd_webhtml_output_folder_qiye&"/"&"1.asp" else weburla="../../"&nd_webhtml_output_folder&"/"&"1.asp" end if weburlqq=RelativePath2RootPathv(weburla) weburlaa=GetUrlpath()&weburlqq weburlaas=weburlaa href_url_linkot=js_ajax_a_t_file ConsultUrlxa=weburlaas aaalinksss=lcase(trim(DefiniteUrlxxc(href_url_linkot,ConsultUrlxa))) '-------- to wu http href_url_link3=aaalinksss fin_posaa=-123 for iiaappss=8 to len(href_url_link3) if mid(href_url_link3,iiaappss,1)="/" then fin_posaa=iiaappss exit for end if next if fin_posaa<>-123 then href_url_link22=mid(href_url_link3,fin_posaa,len(href_url_link3)-fin_posaa+1) aaalinksss=href_url_link22 end if '---------end to wu http Randomize '初始化随机数生成器。 rnddd = cstr(clng(Rnd(255)*99999)+200)&cstr(clng(Rnd(255)*99999)+100)&cstr(clng(Rnd(255)*999)+60)'产生随机数 js_zxml=loadfile("../../inc/zxml.js") js_ajax_conta=replace(js_ajax_conta,"$complie$bz_start$",sssazxa3_1) js_ajax_conta=replace(js_ajax_conta,"$complie$bz_end$",sssazxa3_2) js_ajax_conta=replace(js_ajax_conta,"$complie$ajax_asp_file_temp$",ttmpffilea) js_ajax_conta=replace(js_ajax_conta,"$complie$ajax_asp_file$",aaalinksss) js_ajax_conta=replace(js_ajax_conta,"$complie$html_file_div_name$",div_namea) js_ajax_conta=replace(js_ajax_conta,"$complie$ajax_url_cang$",ajax_asp_file_url_cang) js_ajax_conta=replace(js_ajax_conta,"$complie$ajax_url_cang$",ajax_asp_file_url_cang) js_ajax_conta=replace(js_ajax_conta,"$complie$rnd$",rnddd) if havzmled="" then havzmled="1" js_ajax_conta=replace(js_ajax_conta,"$complie$zxml.js$",js_zxml) else js_ajax_conta=replace(js_ajax_conta,"$complie$zxml.js$","") end if my_cang_paaaa2=replace(my_cang_paac,"\","/") if instr(1,my_cang_paaaa2,"/",1)<>0 then my_cang_paaaa2=replace(my_cang_paaaa2,"/","_") end if my_cang_paaaa2=replace(my_cang_paaaa2,"?","_") my_cang_paaaa2=replace(my_cang_paaaa2,"&","_") my_cang_paaaa2=replace(my_cang_paaaa2,"|","_") my_cang_paaaa2=replace(my_cang_paaaa2,"'","_") my_cang_paaaa2=replace(my_cang_paaaa2,"!","_") my_cang_paaaa2=replace(my_cang_paaaa2,"#","_") my_cang_paaaa2=replace(my_cang_paaaa2,"$","_") my_cang_paaaa2=replace(my_cang_paaaa2,"%","_") my_cang_paaaa2=replace(my_cang_paaaa2,"^","_") my_cang_paaaa2=replace(my_cang_paaaa2,"<","_") my_cang_paaaa2=replace(my_cang_paaaa2,">","_") my_cang_paaaa2=replace(my_cang_paaaa2,"(","_") my_cang_paaaa2=replace(my_cang_paaaa2,")","_") my_cang_paaaa2=replace(my_cang_paaaa2,"{","_") my_cang_paaaa2=replace(my_cang_paaaa2,"}","_") my_cang_paaaa2=replace(my_cang_paaaa2,";","_") my_cang_paaaa2=replace(my_cang_paaaa2,",","_") my_cang_paaaa2=replace(my_cang_paaaa2,"=","_") my_cang_paaaa2=replace(my_cang_paaaa2,":","_") my_cang_paaaa2=replace(my_cang_paaaa2,"[","_") my_cang_paaaa2=replace(my_cang_paaaa2,"]","_") my_cang_paaaa2=replace(my_cang_paaaa2,"~","_") my_cang_paaaa2=replace(my_cang_paaaa2,"`","_") my_cang_paaaa2=replace(my_cang_paaaa2,"@","_") my_cang_paaaa2=replace(my_cang_paaaa2,"&","_") my_cang_paaaa2=replace(my_cang_paaaa2,"*","_") my_cang_paaaa2=replace(my_cang_paaaa2,".","_") ajaxffileazz="nd_js_ajax_kernel_"&xuhao_fangzhichongfu_js&"_"&lable_nname&"_"&left(md5(lable_paramee),12)&my_cang_paaaa2&".js" call createfile("../../"&htmlfld&"/"&ajaxffileazz,js_ajax_conta,true) href_url_linkot=ajaxffileazz aaalinksss2=lcase(trim(DefiniteUrlxxc(href_url_linkot,ConsultUrlxa))) '-------- to wu http href_url_link3=aaalinksss2 fin_posaa=-123 for iiaappss=8 to len(href_url_link3) if mid(href_url_link3,iiaappss,1)="/" then fin_posaa=iiaappss exit for end if next if fin_posaa<>-123 then href_url_link22=mid(href_url_link3,fin_posaa,len(href_url_link3)-fin_posaa+1) aaalinksss2=href_url_link22 end if '---------end to wu http if errvvvaar=1 then div_sttr="不能为 标签参数含$xx_var_asp$i之类的最顶层的标签 生成其ajax的js文件调用,请去掉所有最顶层的标签参数里的$xx_var_asp$i之类的参数" else div_sttr="<div id='"&div_namea&"'>载入中...</div>"&"<script type=text/javascript src='"&aaalinksss2&"'></script>" end if '[\w\W]解决多行换行字符干扰问题 reg1= Re_Replace2(sssazxa3_1)&"[\w\W]*"&Re_Replace2(sssazxa3_2) set Reg= new RegExp Reg.IgnoreCase = True Reg.MultiLine = True Reg.Pattern =reg1 my_aaa = Reg.replace(my_aaa,div_sttr) set Reg=nothing '---------end qqq1------------------ end if next new_d_len=len(my_aaa) contt=qian_aaa&my_aaa&after_aaa enndsttr="<!--nd_complie_linkx_end:[$$"&lable_nname&"("&lable_paramee&")]xx-->" enndiiposs=instr(1,contt,enndsttr,1) 'nowiiposs=enndiiposs+len(enndsttr) nowiiposs=pos_ab11+6 now_dingcen_label_e_pos=now_dingcen_label_e_pos+(new_d_len-old_d_len) end if end if end if end if end if loop get_all_html_s_ajax=contt end function function get_all_aspfile_s_ajax(contt,channel_typea,my_cang_paa) now_dingcen_labelname="" now_dingcen_params="" now_dingcen_label_s_pos=-123 now_dingcen_label_e_pos=-122 my_cang_paac=my_cang_paa havssssaaaqw="" havzmled="" xuhao_fangzhichongfu_js=0 get_all_aspfile_s_ajax=contt nowiiposs=1 have_ajaxaa=1 do while have_ajaxaa=1 have_ajaxaa=0 '------------v1.2------------------ call nd_process_sleep(nd_sleep_x_times_a) '------------v1.2------------------ ssass1="<!--nd_complie_linkx_start:[$$" ssa1=instr(nowiiposs,contt,ssass1,1) start_a_1=ssa1 '找到<!--nd_complie_linkx_start:[$$ if ssa1<>0 then pos_ab1=-123 for ssa2=0 to 999 if ssa1+len(ssass1)>len(contt) then exit for if mid(contt,ssa1+len(ssass1)+ssa2,6)="]xx-->" then pos_ab1=ssa1+len(ssass1)+ssa2 pos_ab11=pos_ab1 exit for end if next '找到]xx--> if pos_ab1<>-123 then have_ajaxaa=1 lable_strr=mid(contt,ssa1+len(ssass1),pos_ab1-(ssa1+len(ssass1))) pos_ab1=-123 for ssa22=1 to 999 if ssa22>len(lable_strr) then exit for if mid(lable_strr,ssa22,1)="(" then pos_ab1=ssa22 exit for end if next if pos_ab1=-123 then 'error nowiiposs=pos_ab11+6 end if '找到( if pos_ab1<>-123 and pos_ab1-1>=1 then lable_nname=lcase(mid(lable_strr,1,pos_ab1-1)) lable_paramee=mid(lable_strr,pos_ab1,len(lable_strr)-1) lable_paramee=mid(lable_paramee,2,len(lable_paramee)-2+1-1) set Rs44s=server.CreateObject("adodb.recordset") sql="select * from [ND_label_cache] where lcase(label_name)='"&lable_nname&"'" Rs44s.open sql,conn,1,1 if Rs44s.eof then Rs44s.close set Rs44s=nothing enndsttr="<!--nd_complie_linkx_end:[$$"&lable_nname&"("&lable_paramee&")]xx-->" enndiiposs=instr(start_a_1,contt,enndsttr,1) 'nowiiposs=enndiiposs+len(enndsttr) nowiiposs=pos_ab11+6 else xuhao_fangzhichongfu_js=xuhao_fangzhichongfu_js+1 enndsttr="<!--nd_complie_linkx_end:[$$"&lable_nname&"("&lable_paramee&")]xx-->" enndiiposs=instr(start_a_1,contt,enndsttr,1) 'nowiiposs=enndiiposs+len(enndsttr) nowiiposs=pos_ab11+6 ennd_a_1=enndiiposs+len(enndsttr)-1 if ssa1>now_dingcen_label_e_pos then now_dingcen_labelname=lable_nname now_dingcen_params=lable_paramee now_dingcen_label_s_pos=ssa1 now_dingcen_label_e_pos=enndiiposs end if ltype=rs44s("label_type") lname=rs44s("label_name") codeb=rs44s("label_code") lsql=rs44s("label_sql") lpath=rs44s("label_full_path_name") lparams=rs44s("label_params") label_fenye_num=rs44s("label_fenye_num") label_beizhu=rs44s("label_beizhu") is_sys_label=rs44s("is_sys_label") label_other_params=replace_when_complie(rs44s("label_other_params")) Rs44s.close set Rs44s=nothing htmledxb=find_other_param("htmledxb",label_other_params) htmledxa=find_other_param("htmledxa",label_other_params) if htmledxa="" then htmledxa="1" htmledxax=clng(htmledxa) 'if htmledxb="" then htmledxb="" sssazxaxx=htmledxb sttrattr="<!--nd_complie_linkx_start:[$$"&lable_nname&"("&lable_paramee&")]xx-->" enndsttr="<!--nd_complie_linkx_end:[$$"&lable_nname&"("&lable_paramee&")]xx-->" if start_a_1-1+len(sttrattr)>=1 then qian_aaa=mid(contt,1,start_a_1-1+len(sttrattr)) else qian_aaa="" end if if ennd_a_1+1-len(enndsttr)-1<=len(contt) then after_aaa=mid(contt,ennd_a_1+1-len(enndsttr),len(contt)-(ennd_a_1+1-len(enndsttr))+1) else after_aaa="" end if my_aaa=mid(contt,start_a_1-1+len(sttrattr)+1,(ennd_a_1+1-len(enndsttr)-1)-(start_a_1-1+len(sttrattr)+1)+1) old_d_len=len(my_aaa) 'html.replace(...,"$ajax_start$ 不能为 标签参数含$xx_var_asp$i之类的标签 生成其ajax的js文件调用,请去掉标签参数里的$xx_var_asp$i之类的参数") if htmledxax=2 then nowiiposs=pos_ab11+6 end if if htmledxax=3 then nowiiposs=pos_ab11+6 end if if htmledxax=1 then '----------qqq1------------------ zhongjian_ajax_asp_cont=loadfile("../../inc/ND_ajax_zhong_asp_template.asp") ptypelib=loadfile("../../inc/ND_moban_page_type.asp") zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$include_ND_moban_page_type.asp$",ptypelib) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$db_str$",main_data_mdb) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$is_qiye$",cstr(nddd_is_qiye)) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$output_folder_qiye$",nd_web_output_folder_qiye) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$output_folder$",nd_web_output_folder) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_admin_login_status_cache$",nd_admin_cach_varb_name) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_mx_complie_temlete_size$",nd_mx_complie_temlete_size) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_web_admin_folder$",nd_web_admin_folder) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_webhtml_output_folder$",nd_webhtml_output_folder) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$nd_webhtml_output_folder_qiye$",nd_webhtml_output_folder_qiye) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$fssoo_nd_var_str_x_customx$",fssoo_nd_var_str_x_customx) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$iscrtfile$$",iscrtfile) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$w_web_config_template$$",w_web_config_template) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$w_files_config$$",w_files_config) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$w_files_config_template$$",w_files_config_template) nnnmdd5=loadfile("../../inc/new_md5.asp") zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$xxxx_d_soft_complie$$md5.asp$",nnnmdd5) zhongjian_ajax_asp_cont=replace(zhongjian_ajax_asp_cont,"$$ndxx_fang_caiji_rand_str_x$$",nd_fang_caiji_rand_str_x) if clng(nddd_is_qiye)=1 then weburla="../../"&nd_web_output_folder_qiye&"/" htmlfld=nd_webhtml_output_folder_qiye else weburla="../../"&nd_web_output_folder&"/" htmlfld=nd_webhtml_output_folder end if '写入nd_js_ajax_kernel_zhongjian_asp_reader_x.asp文件 ttmpffilea="nd_js_ajax_kernel_zhongjian_asp_reader_x.asp" if havssssaaaqw="" then havssssaaaqw="1" call createfile("../../"&htmlfld&"/"&ttmpffilea,zhongjian_ajax_asp_cont,true) end if content2="{$$"&now_dingcen_labelname&"("&now_dingcen_params&")"&"}" 'h_curfile="xxxfirstned"很重要 h_curfile="xxxfirstned" complie_dir="../../"&nd_web_admin_folder&"/"&"adminKernel/" if cstr(nddd_is_qiye)="1" then cpml_is_cms=0 else cpml_is_cms=1 end if ajax_exe_asp=replace_label_main(content2,"sys/sys123.asp") Randomize '初始化随机数生成器。 rnddd = cstr(clng(Rnd(255)*99999)+200)&cstr(clng(Rnd(255)*99999)+100)&cstr(clng(Rnd(255)*99999)+1) '产生随机数 div_namea="nd_div_x_"&rnddd js_ajax_a_t_file="nd_js_ajax_kernel_label_x_"&now_dingcen_labelname&"_"&md5(now_dingcen_params)&".asp" call createfile("../../"&htmlfld&"/"&js_ajax_a_t_file,ajax_exe_asp,true) js_ajax_conta=loadfile("../../inc/ND_js_asp_ajax_template.asp") cang_ss_a=split(now_dingcen_params,",") errvvvaar=0 ajax_asp_file_url_cang="" for iccca=0 to ubound(cang_ss_a) dttass1=lcase(trim(cang_ss_a(iccca))) if left(dttass1,16)="$xx_request_asp$" then cang_mma=mid(dttass1,17,len(dttass1)-17+1) cang_vva=find_url_zhi(my_cang_paa,cang_mma) ajax_asp_file_url_cang=ajax_asp_file_url_cang&cang_mma&"="&cang_vva&"&" end if if left(dttass1,12)="$xx_var_asp$" then errvvvaar=1 exit for end if next if ajax_asp_file_url_cang<>"" then ajax_asp_file_url_cang=left(ajax_asp_file_url_cang,len(ajax_asp_file_url_cang)-1) ajax_asp_file_url_cang=replace(ajax_asp_file_url_cang,"=","$denghaoaspcpu1$") ajax_asp_file_url_cang=replace(ajax_asp_file_url_cang,"&","$adnnhaoaspcpu1$") ajax_asp_file_url_cang=replace(ajax_asp_file_url_cang,"?","$wnnehaoaspcpu1$") if clng(nddd_is_qiye)=1 then weburla="../../"&nd_webhtml_output_folder_qiye&"/"&"1.asp" else weburla="../../"&nd_webhtml_output_folder&"/"&"1.asp" end if weburlqq=RelativePath2RootPathv(weburla) weburlaa=GetUrlpath()&weburlqq weburlaas=weburlaa href_url_linkot=js_ajax_a_t_file ConsultUrlxa=weburlaas aaalinksss=lcase(trim(DefiniteUrlxxc(href_url_linkot,ConsultUrlxa))) '-------- to wu http href_url_link3=aaalinksss fin_posaa=-123 for iiaappss=8 to len(href_url_link3) if mid(href_url_link3,iiaappss,1)="/" then fin_posaa=iiaappss exit for end if next if fin_posaa<>-123 then href_url_link22=mid(href_url_link3,fin_posaa,len(href_url_link3)-fin_posaa+1) aaalinksss=href_url_link22 end if '---------end to wu http Randomize '初始化随机数生成器。 rnddd = cstr(clng(Rnd(255)*99999)+200)&cstr(clng(Rnd(255)*99999)+100)&cstr(clng(Rnd(255)*999)+60)'产生随机数 '特殊标记 sttrattr="$ndx_aspfilea_rpit_teshu_biaoji$" enndsttr="$ndx_aspfilea_rpit_teshu_biaoji$" js_zxml=loadfile("../../inc/zxml.js") js_ajax_conta=replace(js_ajax_conta,"$complie$bz_start$",sttrattr) js_ajax_conta=replace(js_ajax_conta,"$complie$bz_end$",enndsttr) js_ajax_conta=replace(js_ajax_conta,"$complie$ajax_asp_file_temp$",ttmpffilea) js_ajax_conta=replace(js_ajax_conta,"$complie$ajax_asp_file$",aaalinksss) js_ajax_conta=replace(js_ajax_conta,"$complie$html_file_div_name$",div_namea) js_ajax_conta=replace(js_ajax_conta,"$complie$ajax_url_cang$",ajax_asp_file_url_cang) js_ajax_conta=replace(js_ajax_conta,"$complie$ajax_url_cang$",ajax_asp_file_url_cang) js_ajax_conta=replace(js_ajax_conta,"$complie$rnd$",rnddd) if havzmled="" then havzmled="1" js_ajax_conta=replace(js_ajax_conta,"$complie$zxml.js$",js_zxml) else js_ajax_conta=replace(js_ajax_conta,"$complie$zxml.js$","") end if my_cang_paaaa2=replace(my_cang_paac,"\","/") if instr(1,my_cang_paaaa2,"/",1)<>0 then my_cang_paaaa2=replace(my_cang_paaaa2,"/","_") end if my_cang_paaaa2=replace(my_cang_paaaa2,"?","_") my_cang_paaaa2=replace(my_cang_paaaa2,"&","_") my_cang_paaaa2=replace(my_cang_paaaa2,"|","_") my_cang_paaaa2=replace(my_cang_paaaa2,"'","_") my_cang_paaaa2=replace(my_cang_paaaa2,"!","_") my_cang_paaaa2=replace(my_cang_paaaa2,"#","_") my_cang_paaaa2=replace(my_cang_paaaa2,"$","_") my_cang_paaaa2=replace(my_cang_paaaa2,"%","_") my_cang_paaaa2=replace(my_cang_paaaa2,"^","_") my_cang_paaaa2=replace(my_cang_paaaa2,"<","_") my_cang_paaaa2=replace(my_cang_paaaa2,">","_") my_cang_paaaa2=replace(my_cang_paaaa2,"(","_") my_cang_paaaa2=replace(my_cang_paaaa2,")","_") my_cang_paaaa2=replace(my_cang_paaaa2,"{","_") my_cang_paaaa2=replace(my_cang_paaaa2,"}","_") my_cang_paaaa2=replace(my_cang_paaaa2,";","_") my_cang_paaaa2=replace(my_cang_paaaa2,",","_") my_cang_paaaa2=replace(my_cang_paaaa2,"=","_") my_cang_paaaa2=replace(my_cang_paaaa2,":","_") my_cang_paaaa2=replace(my_cang_paaaa2,"[","_") my_cang_paaaa2=replace(my_cang_paaaa2,"]","_") my_cang_paaaa2=replace(my_cang_paaaa2,"~","_") my_cang_paaaa2=replace(my_cang_paaaa2,"`","_") my_cang_paaaa2=replace(my_cang_paaaa2,"@","_") my_cang_paaaa2=replace(my_cang_paaaa2,"&","_") my_cang_paaaa2=replace(my_cang_paaaa2,"*","_") my_cang_paaaa2=replace(my_cang_paaaa2,".","_") ajaxffileazz="nd_js_ajax_kernel_rpasp_"&xuhao_fangzhichongfu_js&"_"&lable_nname&"_"&left(md5(lable_paramee),12)&my_cang_paaaa2&".asp" call createfile("../../"&htmlfld&"/"&ajaxffileazz,js_ajax_conta,true) href_url_linkot=ajaxffileazz aaalinksss2=lcase(trim(DefiniteUrlxxc(href_url_linkot,ConsultUrlxa))) '-------- to wu http href_url_link3=aaalinksss2 fin_posaa=-123 for iiaappss=8 to len(href_url_link3) if mid(href_url_link3,iiaappss,1)="/" then fin_posaa=iiaappss exit for end if next if fin_posaa<>-123 then href_url_link22=mid(href_url_link3,fin_posaa,len(href_url_link3)-fin_posaa+1) aaalinksss2=href_url_link22 end if '---------end to wu http if errvvvaar=1 then div_sttr="不能为 标签参数含$xx_var_asp$i之类的最顶层的标签 生成其ajax的js文件调用,请去掉所有最顶层的标签参数里的$xx_var_asp$i之类的参数" else Randomize '初始化随机数生成器。 get_post_var_ccds=loadfile("../../inc/ND_ajax_get_post_var_to_label.asp") asp_get_url_cang_code=get_post_var_ccds&vbcrlf&chr(60)&chr(37)&vbcrlf&"Fy_Url1=Request.ServerVariables("&chr(34)&"QUERY_STRING"&chr(34)&")"&vbcrlf&"Fy_a1=split(Fy_Url1,"&chr(34)&"&"&chr(34)&")"&vbcrlf&"for Fy_x1=0 to ubound(Fy_a1)"&vbcrlf&"if instr(Fy_a1(Fy_x1),"&chr(34)&"="&chr(34)&")=len(Fy_a1(Fy_x1)) then"&vbcrlf&"Fy_v ="&chr(34)&chr(34)&""&vbcrlf&"else"&vbcrlf&"Fy_v = mid(Fy_a1(Fy_x1),instr(Fy_a1(Fy_x1),"&chr(34)&"="&chr(34)&")+1,len(Fy_a1(Fy_x1)))"&vbcrlf&"end if"&vbcrlf&"Fy_Cs_name= left(Fy_a1(Fy_x1),instr(Fy_a1(Fy_x1),"&chr(34)&"="&chr(34)&")-1)"&vbcrlf&"strUrl=strUrl&Fy_Cs_name&"&chr(34)&"="&chr(34)&"&Fy_v&"&chr(34)&"&"&chr(34)&""&vbcrlf&"Next"&vbcrlf&"if strUrl<>"&chr(34)&chr(34)&" then strUrl=left(strUrl,len(strUrl)-1)"&vbcrlf&" strUrl=replace(strUrl,"&chr(34)&"="&chr(34)&","&chr(34)&"$denghaoaspcpu1$"&chr(34)&")"&vbcrlf&" strUrl=replace(strUrl,"&chr(34)&"&"&chr(34)&","&chr(34)&"$adnnhaoaspcpu1$"&chr(34)&")"&vbcrlf&" strUrl=replace(strUrl,"&chr(34)&"?"&chr(34)&","&chr(34)&"$wnnehaoaspcpu1$"&chr(34)&")"&vbcrlf&chr(37)&chr(62) div_sttr=asp_get_url_cang_code&"<div id='"&div_namea&"'>载入中...</div>"&"<script type=text/javascript>document.write(""<scr""+""ipt type=text/javascript src=\'" & aaalinksss2 &"?ajax_asp_file_url_cang="&chr(60)&chr(37)&"=strUrl"&chr(37)&chr(62)&"&"&"rndnumberndaspcpux="""&"+Math.random()+"&"""\'></scr""+""ipt>"");</script>" end if my_aaa = div_sttr set Reg=nothing '---------end qqq1------------------ end if new_d_len=len(my_aaa) contt=qian_aaa&my_aaa&after_aaa enndsttr="<!--nd_complie_linkx_end:[$$"&lable_nname&"("&lable_paramee&")]xx-->" enndiiposs=instr(1,contt,enndsttr,1) 'nowiiposs=enndiiposs+len(enndsttr) nowiiposs=pos_ab11+6 now_dingcen_label_e_pos=now_dingcen_label_e_pos+(new_d_len-old_d_len) end if end if end if end if loop get_all_aspfile_s_ajax=contt end function function load_files_all_type(is_qiye) is_cms=1 if is_qiye=1 then is_cms=0 set rs112=server.CreateObject("adodb.recordset") if is_cms=1 then rs112.open "select * from ND_templates_folder_reg where is_default_template=true",conn,1,1 else rs112.open "select * from ND_templates_folder_reg_qiye where is_default_template=true",conn,1,1 end if if rs112.eof then replace_webfiles_names=str exit function else ppath="templates/"&rs112("templates_folder_path_name")&"/" scrt_ff="../../"&ppath&iscrtfile use_http_url=0 use_http_post=0 set fileaw=new Cls_FSO set filebw=new DosAsp if fileaw.ReportFileStatus(server.mappath(scrt_ff))=-1 then '模板目录下不存在"&iscrtfile&"安装脚本文件 sconts=loadfile("../../inc/"&w_web_config_template) call SaveXMLDocument_newindexc(scrt_ff,sconts,is_cms) scrt_ff="../../"&ppath&w_files_config sconts=loadfile("../../inc/"&w_files_config_template) call SaveXMLDocument(scrt_ff,sconts) else '模板目录下存在"&iscrtfile&"安装脚本文件 xm_d_c=ReadXMLDocument(scrt_ff,"all_web_file_name_and_type_config") scrt_fff="../../"&ppath&xm_d_c if fileaw.ReportFileStatus(server.mappath(scrt_fff))=-1 then scrt_ff="../../"&ppath&xm_d_c sconts=loadfile("../../inc/"&w_files_config_template) call SaveXMLDocument(scrt_ff,sconts) end if end if ppath="templates/"&rs112("templates_folder_path_name")&"/" scrt_ff="../../"&ppath&iscrtfile xm_d_c=ReadXMLDocument(scrt_ff,"all_web_file_name_and_type_config") scrt_ff="../../"&ppath&xm_d_c set aasc=ReadXMLDocument_nodes(scrt_ff,"files/file_reg") set loaded_file_types=aasc end if rs112.close set rs112=nothing for aiaa=0 to loaded_file_types.length-1 aassaa=trim(rep_xml_br(loaded_file_types(aiaa).selectSingleNode("filetype").text)) bbssbb=trim(rep_xml_br(loaded_file_types(aiaa).selectSingleNode("filename").text)) bbssbb=lcase(trim(bbssbb)) session("nd_filetype_cachex_"&bbssbb)=aassaa next end function function get_file_type111(filenamea) get_file_type="" filenamea=lcase(trim(filenamea)) for aiaa=0 to loaded_file_types.length-1 aassaa=trim(rep_xml_br(loaded_file_types(aiaa).selectSingleNode("filetype").text)) bbssbb=trim(rep_xml_br(loaded_file_types(aiaa).selectSingleNode("filename").text)) bbssbb=lcase(trim(bbssbb)) if bbssbb=filenamea then get_file_type=lcase(aassaa) end if next end function function get_file_type(filenamea) get_file_type=session("nd_filetype_cachex_"&lcase(trim(filenamea))) end function 'pindao_id必填 function get_all_id_by_one_id(aspfilename2,pindao_id,zhuanti_id,class_id,view_id) if instr(1,aspfilename2,"?",1)<>0 then sfilename=left(aspfilename2,instr(1,aspfilename2,"?",1)-1) else sfilename=aspfilename2 end if sfilename=replace(sfilename,"\","/") if instr(1,sfilename,"/",1)<>0 then sfilename=mid(sfilename,instrrev(sfilename,"/")+1,len(sfilename)-(instrrev(sfilename,"/")+1)+1) end if ftypppe2=get_file_type(sfilename) doit_mode="no" doit_mode=get_url_mode_to_make_html(ftypppe2) '千万不要先清空glbal_nd_x_pindao_id,glbal_nd_x_zhuanti_id,glbal_nd_x_class_id之类 '千万不要先清空glbal_nd_x_pindao_id,glbal_nd_x_zhuanti_id,glbal_nd_x_class_id之类 '千万不要先清空glbal_nd_x_pindao_id,glbal_nd_x_zhuanti_id,glbal_nd_x_class_id之类 if pindao_id<>"" then glbal_nd_x_pindao_id=pindao_id set Rs44s1=server.CreateObject("adodb.recordset") sql="select * from [ND_channel] where sys_content_type_name='"&pindao_id&"'" Rs44s1.open sql,conn,1,1 if not Rs44s1.eof then lanmu_typeaa=Rs44s1("lanmu_type") end if Rs44s1.close set Rs44s1=nothing else lanmu_typeaa=channel_typea end if if view_id<>"" then glbal_nd_x_view_id=view_id hhhsai=0 if lanmu_typeaa="Article" then hhhsai=1 set Rs44s11=server.CreateObject("adodb.recordset") sql="select * from [ND_Article] where id="&view_id&"" Rs44s11.open sql,conn,1,1 end if if lanmu_typeaa="down" then hhhsai=1 set Rs44s11=server.CreateObject("adodb.recordset") sql="select * from [ND_down] where id="&view_id&"" Rs44s11.open sql,conn,1,1 end if if lanmu_typeaa="pic_or_sp" then hhhsai=1 set Rs44s11=server.CreateObject("adodb.recordset") sql="select * from [ND_pic_or_sp] where id="&view_id&"" Rs44s11.open sql,conn,1,1 end if if lanmu_typeaa="cp" then hhhsai=1 set Rs44s11=server.CreateObject("adodb.recordset") sql="select * from [ND_prod] where id="&view_id&"" Rs44s11.open sql,conn,1,1 end if if lanmu_typeaa="ND_danArticle_class" then hhhsai=1 set Rs44s11=server.CreateObject("adodb.recordset") sql="select * from [ND_danArticle_class] where id="&view_id&"" Rs44s11.open sql,conn,1,1 end if if hhhsai=1 then if not Rs44s11.eof then glbal_nd_x_class_id=Rs44s11("classid") glbal_nd_x_zhuanti_id=Rs44s11("SpecialID") glbal_nd_x_pindao_id=Rs44s11("sys_content_type") end if end if end if if zhuanti_id<>"" then hhhsai=0 if lanmu_typeaa="Article" then hhhsai=1 set Rs44s111=server.CreateObject("adodb.recordset") sql="select * from [ND_Article_Special] where id="&zhuanti_id&"" Rs44s111.open sql,conn,1,1 end if if lanmu_typeaa="down" then hhhsai=1 set Rs44s111=server.CreateObject("adodb.recordset") sql="select * from [ND_down_Special] where id="&zhuanti_id&"" Rs44s111.open sql,conn,1,1 end if if lanmu_typeaa="pic_or_sp" then hhhsai=1 set Rs44s111=server.CreateObject("adodb.recordset") sql="select * from [ND_pic_or_sp_Special] where id="&zhuanti_id&"" Rs44s111.open sql,conn,1,1 end if if lanmu_typeaa="cp" then hhhsai=1 set Rs44s111=server.CreateObject("adodb.recordset") sql="select * from [ND_prod_Special] where id="&zhuanti_id&"" Rs44s111.open sql,conn,1,1 end if glbal_nd_x_zhuanti_id=zhuanti_id if hhhsai=1 then if not Rs44s111.eof then glbal_nd_x_pindao_id=Rs44s111("sys_content_type") end if end if end if if class_id<>"" then glbal_nd_x_class_id=class_id hhhsai=0 if lanmu_typeaa="Article" then hhhsai=1 set Rs44s1111=server.CreateObject("adodb.recordset") sql="select * from [ND_Article_class] where id="&class_id&"" Rs44s1111.open sql,conn,1,1 end if if lanmu_typeaa="down" then hhhsai=1 set Rs44s1111=server.CreateObject("adodb.recordset") sql="select * from [ND_down_class] where id="&class_id&"" Rs44s1111.open sql,conn,1,1 end if if lanmu_typeaa="pic_or_sp" then hhhsai=1 set Rs44s1111=server.CreateObject("adodb.recordset") sql="select * from [ND_pic_or_sp_class] where id="&class_id&"" Rs44s1111.open sql,conn,1,1 end if if lanmu_typeaa="cp" then hhhsai=1 set Rs44s1111=server.CreateObject("adodb.recordset") sql="select * from [ND_prod_class] where id="&class_id&"" Rs44s1111.open sql,conn,1,1 end if if lanmu_typeaa="cp" then hhhsai=1 set Rs44s1111=server.CreateObject("adodb.recordset") sql="select * from [ND_prod_class] where id="&class_id&"" Rs44s1111.open sql,conn,1,1 end if if lanmu_typeaa="ND_danArticle_class" then hhhsai=1 set Rs44s1111=server.CreateObject("adodb.recordset") sql="select * from [ND_prod_class] where id="&class_id&"" Rs44s1111.open sql,conn,1,1 end if if hhhsai=1 then if not Rs44s1111.eof then glbal_nd_x_pindao_id=Rs44s1111("sys_content_type") end if end if end if end function 'pindao_id必填 function get_qiangzhi_url_cang_main(aspfilename1,cid_var_name,pindao_id_var_name,zid_var_name,viewid_var_name,bodya) get_qiangzhi_url_cang_main=get_qiangzhi_url_cang(aspfilename1,cid_var_name,pindao_id_var_name,zid_var_name,viewid_var_name,bodya) end function '规范化url参数的格式,以统一 按url参数和文件名md5后 的html文件名 '此版本的规范化 只适用于新动软官方标签库v080811里运行输出的各url,对于自定义asp代码而来的url输出,请修改inc/ND_moban_page_type.asp里的function get_url_mode_to_make_html函数 '对于自定义asp代码而来的url输出,请修改inc/ND_moban_page_type.asp里的function get_url_mode_to_make_html函数 function get_qiangzhi_url_cang(aspfilename,cid_var_name,pindao_id_var_name,zid_var_name,viewid_var_name,bodya) if instr(1,aspfilename,"?",1)<>0 and len(aspfilename)>=instr(1,aspfilename,"?",1)+1 then urlcan=mid(aspfilename,instr(1,aspfilename,"?",1)+1,len(aspfilename)-instr(1,aspfilename,"?",1)) else urlcan="" end if if instr(1,aspfilename,"?",1)<>0 then sfilename=left(aspfilename,instr(1,aspfilename,"?",1)-1) else sfilename=aspfilename end if sfilename=replace(sfilename,"\","/") if instr(1,sfilename,"/",1)<>0 then sfilename=mid(sfilename,instrrev(sfilename,"/")+1,len(sfilename)-(instrrev(sfilename,"/")+1)+1) end if ftypppe=get_file_type(sfilename) doit_mode="no" doit_mode=get_url_mode_to_make_html(ftypppe) 'type: pindao ,zhuanti ,class ,view if doit_mode="no" then get_qiangzhi_url_cang=aspfilename else urldddta=split(doit_mode,",") '勿必先清空: '勿必先清空: glbal_nd_x_pindao_id="" glbal_nd_x_zhuanti_id="" glbal_nd_x_class_id="" glbal_nd_x_view_id="" '======== s==================================== for urldddtaiii1=0 to ubound(urldddta) urldddta_1=urldddta(urldddtaiii1) urldddta_1_1=split(urldddta_1,"|") urla_minga=urldddta_1_1(0) urla_typee=urldddta_1_1(1) '-------1---- if urla_typee="class" then if cid_var_name<>"" then urla_minga=cid_var_name '-------1 if instr(1,aspfilename,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_class_id=valuuue end if '-------1 '-------1_1 if instr(1,aspfilename,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_class_id=valuuue end if '-------1_1 end if '-------end 1---- '-------2---- if urla_typee="pindao" then if pindao_id_var_name<>"" then urla_minga=pindao_id_var_name '-------1 if instr(1,aspfilename,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_pindao_id=valuuue end if '-------1 '-------1_1 if instr(1,aspfilename,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_pindao_id=valuuue end if '-------1_1 end if '-------end 2---- '-------3---- if urla_typee="zhuanti" then if zid_var_name<>"" then urla_minga=zid_var_name '-------1 if instr(1,aspfilename,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_zhuanti_id=valuuue end if '-------1 '-------1_1 if instr(1,aspfilename,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_zhuanti_id=valuuue end if '-------1_1 end if '-------end 3---- '-------4---- if urla_typee="view" then if viewid_var_name<>"" then urla_minga=viewid_var_name '-------1 if instr(1,aspfilename,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_view_id=valuuue end if '-------1 '-------1_1 if instr(1,aspfilename,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_view_id=valuuue end if '-------1_1 end if '-------end 4---- next '========end s==================================== pindao_id1=glbal_nd_x_pindao_id zhuanti_id1=glbal_nd_x_zhuanti_id class_id1=glbal_nd_x_class_id view_id1=glbal_nd_x_view_id call get_all_id_by_one_id(aspfilename,pindao_id1,zhuanti_id1,class_id1,view_id1) pindao_id=glbal_nd_x_pindao_id zhuanti_id=glbal_nd_x_zhuanti_id class_id=glbal_nd_x_class_id view_id=glbal_nd_x_view_id for urldddtaiii=0 to ubound(urldddta) urldddta_1=urldddta(urldddtaiii) urldddta_1_1=split(urldddta_1,"|") urla_minga=urldddta_1_1(0) urla_typee=urldddta_1_1(1) '-------1---- if urla_typee="class" then if cid_var_name<>"" then urla_minga=cid_var_name '-------1 if instr(1,aspfilename,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_class_id=valuuue end if '-------1 '-------1_1 if instr(1,aspfilename,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_class_id=valuuue end if '-------1_1 if instr(1,aspfilename,"&"&urla_minga&"=",1)=0 and instr(1,aspfilename,"?"&urla_minga&"=",1)=0 then if class_id<>"" then aspfilename=JoinChara(aspfilename) aspfilename=aspfilename&urla_minga&"="&class_id else aspfilename=aspfilename end if end if end if '-------end 1---- '-------2---- if urla_typee="pindao" then if pindao_id_var_name<>"" then urla_minga=pindao_id_var_name '-------1 if instr(1,aspfilename,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_pindao_id=valuuue end if '-------1 '-------1_1 if instr(1,aspfilename,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_pindao_id=valuuue end if '-------1_1 if instr(1,aspfilename,"&"&urla_minga&"=",1)=0 and instr(1,aspfilename,"?"&urla_minga&"=",1)=0 then if pindao_id<>"" then aspfilename=JoinChara(aspfilename) aspfilename=aspfilename&urla_minga&"="&pindao_id else aspfilename=aspfilename end if end if end if '-------end 2---- '-------3---- if urla_typee="zhuanti" then if zid_var_name<>"" then urla_minga=zid_var_name '-------1 if instr(1,aspfilename,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_zhuanti_id=valuuue end if '-------1 '-------1_1 if instr(1,aspfilename,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_zhuanti_id=valuuue end if '-------1_1 if instr(1,aspfilename,"&"&urla_minga&"=",1)=0 and instr(1,aspfilename,"?"&urla_minga&"=",1)=0 then if zhuanti_id<>"" then aspfilename=JoinChara(aspfilename) aspfilename=aspfilename&urla_minga&"="&zhuanti_id else aspfilename=aspfilename end if end if end if '-------end 3---- '-------4---- if urla_typee="view" then if viewid_var_name<>"" then urla_minga=viewid_var_name '-------1 if instr(1,aspfilename,"&"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"&"&urla_minga&"=",1) orrg=psspo1+len("&"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_view_id=valuuue end if '-------1 '-------1_1 if instr(1,aspfilename,"?"&urla_minga&"=",1)<>0 then psspo1=instr(1,aspfilename,"?"&urla_minga&"=",1) orrg=psspo1+len("?"&urla_minga&"=") for psspo1_1=orrg to len(aspfilename) if mid(aspfilename,psspo1_1,1)="&" then psspo1_1_1=psspo1_1 exit for end if if psspo1_1=len(aspfilename) then psspo1_1_1=psspo1_1+1 exit for end if next if orrg>len(aspfilename) then valuuue="" else valuuue=mid(aspfilename,orrg,psspo1_1_1-orrg) end if glbal_nd_x_view_id=valuuue end if '-------1_1 if instr(1,aspfilename,"&"&urla_minga&"=",1)=0 and instr(1,aspfilename,"?"&urla_minga&"=",1)=0 then if view_id<>"" then aspfilename=JoinChara(aspfilename) aspfilename=aspfilename&urla_minga&"="&view_id else aspfilename=aspfilename end if end if end if '-------end 4---- next aspfilename=get_md5_htm_filename_by_aspfilename(aspfilename,bodya,htm_ext_ming,0,"") get_qiangzhi_url_cang=aspfilename end if end function '各个入口: function make_all_htmed_main(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex,is_qiye,per_run_htmed_num) nddd_is_qiye=is_qiye call load_htm_ext_ming(is_qiye) '--------------------------------------1 Set myCache1=new clsCache_b CacheTemp="nd_htm_" myCache1.name=CacheTemp & "nd_cid_var_name" If myCache1.valid then cid_var_namex=myCache1.value Else cid_var_namex="" End If myCache1.name=CacheTemp & "nd_pdid_var_name" If myCache1.valid then pindao_id_var_namex=myCache1.value Else pindao_id_var_namex="" End If myCache1.name=CacheTemp & "nd_arid_var_name" If myCache1.valid then viewid_var_namex=myCache1.value Else viewid_var_namex="" End If myCache1.name=CacheTemp & "nd_zid_var_name" If myCache1.valid then zid_var_namex=myCache1.value Else zid_var_namex="" End If set myCache1=nothing '--------------------------------------1 call set_id_var_names(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex) call make_all_htm(is_qiye,per_run_htmed_num) end function '一次只能生成一个cid的所有分页 function make_classfile_htmed_by_cid_main(class_page_url,is_htmed_other_pindao_aspfile,cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex,cid,pindao_id,is_qiye,per_run_htmed_num) nddd_is_qiye=is_qiye call load_htm_ext_ming(is_qiye) '--------------------------------------1 Set myCache1=new clsCache_b CacheTemp="nd_htm_" myCache1.name=CacheTemp & "nd_cid_var_name" If myCache1.valid then cid_var_namex=myCache1.value Else cid_var_namex="" End If myCache1.name=CacheTemp & "nd_pdid_var_name" If myCache1.valid then pindao_id_var_namex=myCache1.value Else pindao_id_var_namex="" End If myCache1.name=CacheTemp & "nd_arid_var_name" If myCache1.valid then viewid_var_namex=myCache1.value Else viewid_var_namex="" End If myCache1.name=CacheTemp & "nd_zid_var_name" If myCache1.valid then zid_var_namex=myCache1.value Else zid_var_namex="" End If set myCache1=nothing '--------------------------------------1 call set_id_var_names(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex) call make_a_aspfile_s_htm_by_cid(cid,class_page_url,is_qiye,per_run_htmed_num,is_htmed_other_pindao_aspfile,"class") end function '一次只能生成一个cid的所有未更新或未生成的分页 function make_new_classfile_htmed_by_cid_main(class_page_url,is_htmed_other_pindao_aspfile,cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex,cid,pindao_id,is_qiye,per_run_htmed_num) nddd_is_qiye=is_qiye call load_htm_ext_ming(is_qiye) '--------------------------------------1 Set myCache1=new clsCache_b CacheTemp="nd_htm_" myCache1.name=CacheTemp & "nd_cid_var_name" If myCache1.valid then cid_var_namex=myCache1.value Else cid_var_namex="" End If myCache1.name=CacheTemp & "nd_pdid_var_name" If myCache1.valid then pindao_id_var_namex=myCache1.value Else pindao_id_var_namex="" End If myCache1.name=CacheTemp & "nd_arid_var_name" If myCache1.valid then viewid_var_namex=myCache1.value Else viewid_var_namex="" End If myCache1.name=CacheTemp & "nd_zid_var_name" If myCache1.valid then zid_var_namex=myCache1.value Else zid_var_namex="" End If set myCache1=nothing '--------------------------------------1 call set_id_var_names(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex) call make_a_aspfile_s_htm_by_cid(cid,class_page_url,is_qiye,per_run_htmed_num,is_htmed_other_pindao_aspfile,"class_new") end function '一次只能生成一个zid的所有专题页 function make_ztfile_htmed_by_cid_main(class_page_url,is_htmed_other_pindao_aspfile,cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex,cid,pindao_id,is_qiye,per_run_htmed_num) nddd_is_qiye=is_qiye call load_htm_ext_ming(is_qiye) '--------------------------------------1 Set myCache1=new clsCache_b CacheTemp="nd_htm_" myCache1.name=CacheTemp & "nd_cid_var_name" If myCache1.valid then cid_var_namex=myCache1.value Else cid_var_namex="" End If myCache1.name=CacheTemp & "nd_pdid_var_name" If myCache1.valid then pindao_id_var_namex=myCache1.value Else pindao_id_var_namex="" End If myCache1.name=CacheTemp & "nd_arid_var_name" If myCache1.valid then viewid_var_namex=myCache1.value Else viewid_var_namex="" End If myCache1.name=CacheTemp & "nd_zid_var_name" If myCache1.valid then zid_var_namex=myCache1.value Else zid_var_namex="" End If set myCache1=nothing '--------------------------------------1 call set_id_var_names(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex) call make_a_aspfile_s_htm_by_cid(cid,class_page_url,is_qiye,per_run_htmed_num,is_htmed_other_pindao_aspfile,"zhuanti") end function '一次只能生成一个zid的所有未更新或未生成的专题页 function make_ztnewfile_htmed_by_cid_main(class_page_url,is_htmed_other_pindao_aspfile,cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex,cid,pindao_id,is_qiye,per_run_htmed_num) nddd_is_qiye=is_qiye call load_htm_ext_ming(is_qiye) '--------------------------------------1 Set myCache1=new clsCache_b CacheTemp="nd_htm_" myCache1.name=CacheTemp & "nd_cid_var_name" If myCache1.valid then cid_var_namex=myCache1.value Else cid_var_namex="" End If myCache1.name=CacheTemp & "nd_pdid_var_name" If myCache1.valid then pindao_id_var_namex=myCache1.value Else pindao_id_var_namex="" End If myCache1.name=CacheTemp & "nd_arid_var_name" If myCache1.valid then viewid_var_namex=myCache1.value Else viewid_var_namex="" End If myCache1.name=CacheTemp & "nd_zid_var_name" If myCache1.valid then zid_var_namex=myCache1.value Else zid_var_namex="" End If set myCache1=nothing '--------------------------------------1 call set_id_var_names(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex) call make_a_aspfile_s_htm_by_cid(cid,class_page_url,is_qiye,per_run_htmed_num,is_htmed_other_pindao_aspfile,"zhuanti_new") end function '生成文章频道一个分类的所有详细页htm function make_viewfile_htmed_by_cid_main(class_page_url,is_htmed_other_pindao_aspfile,cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex,cid,pindao_id,is_qiye,per_run_htmed_num) nddd_is_qiye=is_qiye call load_htm_ext_ming(is_qiye) '--------------------------------------1 Set myCache1=new clsCache_b CacheTemp="nd_htm_" myCache1.name=CacheTemp & "nd_cid_var_name" If myCache1.valid then cid_var_namex=myCache1.value Else cid_var_namex="" End If myCache1.name=CacheTemp & "nd_pdid_var_name" If myCache1.valid then pindao_id_var_namex=myCache1.value Else pindao_id_var_namex="" End If myCache1.name=CacheTemp & "nd_arid_var_name" If myCache1.valid then viewid_var_namex=myCache1.value Else viewid_var_namex="" End If myCache1.name=CacheTemp & "nd_zid_var_name" If myCache1.valid then zid_var_namex=myCache1.value Else zid_var_namex="" End If set myCache1=nothing '--------------------------------------1 call set_id_var_names(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex) call make_a_aspfile_s_htm_by_cid(cid,class_page_url,is_qiye,per_run_htmed_num,is_htmed_other_pindao_aspfile,"view") end function '生成文章频道一个分类的所有未更新或未生成的详细页htm function make_new_viewfile_htmed_by_cid_main(class_page_url,is_htmed_other_pindao_aspfile,cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex,cid,pindao_id,is_qiye,per_run_htmed_num) nddd_is_qiye=is_qiye call load_htm_ext_ming(is_qiye) '--------------------------------------1 Set myCache1=new clsCache_b CacheTemp="nd_htm_" myCache1.name=CacheTemp & "nd_cid_var_name" If myCache1.valid then cid_var_namex=myCache1.value Else cid_var_namex="" End If myCache1.name=CacheTemp & "nd_pdid_var_name" If myCache1.valid then pindao_id_var_namex=myCache1.value Else pindao_id_var_namex="" End If myCache1.name=CacheTemp & "nd_arid_var_name" If myCache1.valid then viewid_var_namex=myCache1.value Else viewid_var_namex="" End If myCache1.name=CacheTemp & "nd_zid_var_name" If myCache1.valid then zid_var_namex=myCache1.value Else zid_var_namex="" End If set myCache1=nothing '--------------------------------------1 call set_id_var_names(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex) call make_a_aspfile_s_htm_by_cid(cid,class_page_url,is_qiye,per_run_htmed_num,is_htmed_other_pindao_aspfile,"view_new") end function '生成频道首页,热门内容页,最新内容页,推荐内容页,系统首页 function make_danpage_file_htmed_by_cid_main(func,class_page_url,is_htmed_other_pindao_aspfile,cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex,cid,pindao_id,is_qiye,per_run_htmed_num) nddd_is_qiye=is_qiye call load_htm_ext_ming(is_qiye) '--------------------------------------1 Set myCache1=new clsCache_b CacheTemp="nd_htm_" myCache1.name=CacheTemp & "nd_cid_var_name" If myCache1.valid then cid_var_namex=myCache1.value Else cid_var_namex="" End If myCache1.name=CacheTemp & "nd_pdid_var_name" If myCache1.valid then pindao_id_var_namex=myCache1.value Else pindao_id_var_namex="" End If myCache1.name=CacheTemp & "nd_arid_var_name" If myCache1.valid then viewid_var_namex=myCache1.value Else viewid_var_namex="" End If myCache1.name=CacheTemp & "nd_zid_var_name" If myCache1.valid then zid_var_namex=myCache1.value Else zid_var_namex="" End If set myCache1=nothing '--------------------------------------1 call set_id_var_names(cid_var_namex,pindao_id_var_namex,zid_var_namex,viewid_var_namex) call make_a_aspfile_s_htm_by_cid(cid,class_page_url,is_qiye,per_run_htmed_num,is_htmed_other_pindao_aspfile,func) end function %>